fazlionline Posted February 16, 2010 Report Share Posted February 16, 2010 I have I contact us form to send data to my email. All fields works fine but I get the Gender value NOTHING. Can anyone tell me what is wrong in my scrip? <?php $to = "[my real email]"; $subject = $_REQUEST['subj'] ; $name = $_REQUEST['name'] ; $city = $_REQUEST['city'] ; $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; $gender = $_REQUEST['gender'] ; $url = "T1 - fazlionline - Contact Form"; $details = "\n URL - Form: $url\n Subject: $subject\n Name: $name\n City: $city\n From: $email \n Gender: $gender \n Message: $message \n "; ini_set("sendmail_from", $email); $headers = $email; $sent = mail($to, $subject, $details, $headers, $message) ; if($sent) {print "Your mail was sent successfully"; } else {print "We encountered an error sending your mail"; } ?> Quote Link to comment Share on other sites More sharing options...
Wickham Posted February 16, 2010 Report Share Posted February 16, 2010 I can't see anything wrong with the php code and you are getting the email with the other fields, so it's probably not getting the field from the form. Remember that with radio buttons the name has to be the same for all radio buttons, only the value is different, like:- > </pre> <li>Male Female Child</li> Quote Link to comment Share on other sites More sharing options...
fazlionline Posted February 18, 2010 Author Report Share Posted February 18, 2010 thanks Wickham my problem is solved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.