Jump to content

Pull Down Menus


westmich

Recommended Posts

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]<?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");
}
?>[/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]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.