Jump to content

PHP email not working


ShaolinF

Recommended Posts

Hi Guys,

 

I'm having problems when emailing stuff to my email address, one entry (sex) works but the rest of the fields don't. See below:

 

Form:

<FORM action="continue.php" method="post">

    <P>

    <LABEL for="name">Your Name: </LABEL><BR>

              <INPUT type="text" id="name" size="26"><BR><BR>

    <LABEL for="contact">Your Contact No: </LABEL><BR>

              <INPUT type="text" id="contact" size="26"><BR><BR>

    <LABEL for="email">Your Email: </LABEL><BR>

              <INPUT type="text" id="email" size="26"><BR><BR>

    <INPUT type="radio" name="sex" value="Male" class="radioStyle"> Male

    <INPUT type="radio" name="sex" value="Female" class="radioStyle"> Female<BR><BR>

    <INPUT type="reset" class="altButtonFormat">

    <INPUT type="submit" value="Continue >>" class="altButtonFormat">

    </P>

</FORM>

 

<?php
//send email
$msg = "New Ticket Reservation\n";
$msg .= ".\n";
$msg .= "Full Name:    ".$_POST['name']."\n";
$msg .= "Contact Number:     ".$_POST['contact']."\n";   
$msg .= "Email:    ".$_POST['email']."\n";   
$msg .= "Male/Female:    ".$_POST['sex']."\n";    
$msg .= ".\n";  
$to = "[email protected]";  
$subject = "New Ticket Reservation from";  
$mailheaders = "From:  $Email <$Email> \n";  
$mailheaders .= "Reply-To: $sender_email\n\n";  
mail($to, $subject, $msg, $mailheaders);  
?>

Link to comment
https://forums.phpfreaks.com/topic/73030-php-email-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.