Jump to content

radio box value does not appear in email


Recommended Posts

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?


$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) ; 
{print "Your mail was sent successfully"; }
{print "We encountered an error sending your mail"; }

Link to comment
Share on other sites

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:-


Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...