DH Templates

how to export values from an html drop down list to a php file?

I have a contact form in a site template which looks like this <div class="col-1 footer-pad"> <h4>Request info</h4> <form id="Form" method="get" action="request.php" name="requestform"> <fieldset> <label><input type="text" name="Name" value="Your Name" class="input" onblur="if(this.value=='') this.value='Your Name'" onFocus="if(this.value =='Your Name' ) this.value=''" /></label> <label><input type="text" name="Number" value="Your Phone number" class="input" onblur="if(this.value=='') this.value='Your Phone number'" onFocus="if(this.value =='Your Phone number' ) this.value=''" /></label> <label><select name="List"> <option value="m1">Request info on</option> <option value="m2">Door Supervision</option> </select></label> <div class="alignright"> <a href="#" class="link1" onClick="document.getElementById('Form').reset()">tell us more</a><a href="#" class="link2" onClick="document.getElementById('Form').submit()">submit</a> </div> </fieldset> </form> </div> I am trying to output the values to the following php so they get mailed. <?php $subject="from ".$_GET['Name']; $headers= "From: ".$_GET['Number']."\n"; $headers.='Content-type: text/html; charset=iso-8859-1'; mail("feeds@k****", $subject, " <html> <head> <title>Contact letter</title> </head> <body> <br> ".$_GET['List']." </body> </html>" , $headers); echo("<script>location.href = '/prem/contactsuccess.php';</script>"); ?> its not working please help. cheers.

Public Comments

  1. Headers in the email are seperated by '\r\n' not just 'n'. it's normally best to put this value into a value.. ex. $mylist = $_GET['list']; then posting this in.. .... <BR>$mylist </body> .... your problem though is just the \n it needs to be \r\n with headers.
Powered by Yahoo! Answers