westmich Posted April 29, 2006 Share Posted April 29, 2006 Hi All,I need some help, I have a contact form and inside this form there are some pull down menus. Now after you fill out the form you hit submit and the whole thing emails, right, well, not all of it will email the pull down options will not email. I have never really done a pull down menu with php, so if anyone can help me out here I would greatly appreciate it. Here is my php code for the form:[code]<?PHPif ($_POST['Firstname']!=""){ $to = "[email protected]";$msg="First Name: {$_POST['Firstname']}\n";$msg.="Last Name: {$_POST['Lastname']}\n";$msg.="Company: {$_POST['Company']}\n";$msg.="Email Address: {$_POST['email']}\n\n";$msg.="Address 1: {$_POST['Addone']}\n";$msg.="Address 2: {$_POST['Addtwo']}\n";$msg.="City: {$_POST['City']}\n";$msg.="State/Province: {$_POST['State']}\n";$msg.="Zip: {$_POST['Zip']}\n";$msg.="Phone: {$_POST['Phone']}\n";$msg.="Company Type:\n"; if ($_POST['cotype0']!="") $msg.="Healthcare Provider \n\n"; if ($_POST['cotype1']!="") $msg.="Revenue Cycle Consultant \n\n"; if ($_POST['cotype2']!="") $msg.="Healthcare Financing \n\n"; if ($_POST['cotype3']!="") $msg.="Other \n\n"; $msg.="Number of Beds:\n"; if ($_POST['bed0']!="") $msg.="Less than 100\n\n"; if ($_POST['bed1']!="") $msg.="100-250\n\n"; if ($_POST['bed2']!="") $msg.="251-500\n\n"; if ($_POST['bed3']!="") $msg.="500 or More\n\n";$msg.="Comments/Questions: {$_POST['Comments']}\n";$subject="Contact Us";$mailheaders="From:Healthcare Funding Solutions <.com>\n";mail($to, $subject, $msg, "From:{$_POST['email']}\r\nReply-To: {$_POST['email']}\r\n");}?>[/code]And here is the drop down menu html code:[code]<select name="cotype" class="text" id="cotype"> <option value="type0">Healthcare Provider</option> <option value="type1">Revenue Cycle Consultant</option> <option value="type2">Healthcare Financing</option> <option value="type3">Other</option> </select> </label></td> </tr> <tr> <td align="left" valign="top" class="text">Number of Beds </td> <td valign="top"><label> <select name="numberbeds" class="text" id="numberbeds"> <option value="bed0">>100</option> <option value="bed1">100-250</option> <option value="bed2">251-300</option> <option value="bed3">300+</option> </select>[/code]I have been working on this for a while now and I am starting to go crazy over it, so please let me know what I am doing wrong. Thanks![b]EDITED BY WILDTEEN88: PLEASE USE THE CODE TAGS RATHER THAN THE COLOUR TAGS WHEN POSTING CODE. TO USE THE CODE TAGS PASTE YOUR CODE THEN HIGHLIGHT IT PRESS THE [img src=\"http://www.phpfreaks.com/forums/style_images/1/folder_rte_images/code.gif\" border=\"0\" alt=\"IPB Image\" /] BUTTON.THANX[/b] Quote Link to comment https://forums.phpfreaks.com/topic/8705-pull-down-menus/ Share on other sites More sharing options...
westmich Posted April 29, 2006 Author Share Posted April 29, 2006 Never mind guys, I figured it out! Thanks though. Quote Link to comment https://forums.phpfreaks.com/topic/8705-pull-down-menus/#findComment-31980 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.