Jump to content


Photo

Pull Down Menus


  • Please log in to reply
1 reply to this topic

#1 westmich

westmich
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 29 April 2006 - 01:42 PM

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:

<?PHP

if ($_POST['Firstname']!=""){

 
$to = "michelle@zenmanproductions.com";
$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");
}
?>

And here is the drop down menu html 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>

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!

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


#2 westmich

westmich
  • New Members
  • Pip
  • Newbie
  • 6 posts

Posted 29 April 2006 - 05:09 PM

Never mind guys, I figured it out! Thanks though.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users