fazlionline Posted February 16, 2010 Report 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"; } ?>
Wickham Posted February 16, 2010 Report 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>
fazlionline Posted February 18, 2010 Author Report Posted February 18, 2010 thanks Wickham my problem is solved.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now