Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Zvp
    Zvp is offline
    New to the CF scene
    Join Date
    Jan 2012
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    <form action="mailto:email@gmail.com" method="post">Not working! PLEASE HELP!

    Hey does anyone know how to make radio buttons be sent, when clicking Submit to my email. I know it has to do with <form action="">.
    I have this:
    Code:
    <form action="mailto:email@gmail.com" method="post">
    <some code here...>
    </form>
    Last edited by Zvp; 03-13-2012 at 02:57 AM.

  • #2
    New Coder
    Join Date
    Mar 2012
    Location
    Tulsa, OK
    Posts
    31
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Quote Originally Posted by Zvp View Post
    Hey does anyone know how to make radio buttons be sent, when clicking Submit to my email. I know it has to do with <form action="">.
    I have this:
    Code:
    <form action="mailto:email@gmail.com" method="post">
    <some code here...>
    </form>
    Here is what the html should look like... change "contact.php" to what you save the following php as.

    Code:
    <form name="contact_form" method="post" action="contact.php">
    </form>
    Save this is a new file with a .php extension. Fill in the variables. Where you see $mailcontent = $_POST["radiobutton"];, change "radiobutton" to the id of your object.

    PHP Code:
    <?php
    $toaddress 
    "name@host.com";

    $fromaddress "your@email.com";

    $subject "Message Subject";

    $mailcontent $_POST["radiobutton"];

    $mailcontent wordwrap($mailcontent70);

    mail($toaddress$subject$mailcontent$fromaddress);
    ?>

  • Users who have thanked telekovar for this post:

    Zvp (03-13-2012)

  • #3
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Also, be aware that php mail() requires SMTP to be enabled on your server otherwise the email won't be sent.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •