Adding Drop-Down Menu to Existing Email Form

Hi All

Now our contact us page is working, we would like some feedback from users who contact us via the web page. I’d like to add a simple drop down box asking users where they hear of us but it doesn’t work.

I’d like to embed the code into the existing HTML form and PHP script but what I thought was correct actually doesn’t do anything.

Here is the code


Contact Us

Please fill out the following form to contact us.

Your Name:

Company Name:

Phone Number:

Your Email:

How Did You Hear About Us? Internet Word Of Mouth Flyer Never Heard Of Us

Your Message:


<?php //Email Details $EmailFrom = "**@**"; $EmailTo = "**@**"; $Subject = "Website Contact Form Submission"; $Name = trim(stripslashes($_POST['Name'])); $Email = trim(stripslashes($_POST['Email'])); $Comments = trim(stripslashes($_POST['Comments'])); $Company = trim(stripslashes($_POST['Company'])); $Phone = trim(stripslashes($_POST['Phone'])); $How = trim(stripslashes($_POST['How'])); // prepare email body text $Body .= "Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Company Name: "; $Body .= $Company; $Body .= "\n"; $Body .= "Phone Number: "; $Body .= $Phone; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Message: "; $Body .= $Comments; $Body .= "\n"; // send email $success = mail($EmailTo,$Subject,$Body, "From: <$EmailFrom>"); // redirect to success page // CHANGE THE URL BELOW TO YOUR "THANK YOU" PAGE if ($success){ print ""; } else{ print ""; } ?>

Thanks for looking

You need to add value attribute to options:

<option value="Internet">Internet</option>
Sponsor our Newsletter | Privacy Policy | Terms of Service