How do I code the drop down and multiple options? I've tried several different ways, but I can't get the info to show up in the email..
On the registration form itself, I have 1 multiple and 2 drop down options:
distilled...
<select name="multiple" size="6" multiple>
<option value="Great Smoky Mountains 1">Great Smoky Mountains I, TN - April 20-24, 2009, $895</option>
<option value="SmokiesII">Great Smoky Mountains II, TN - April 27 - May 1, 2009, $895</option>
</select>
<select size="1" name="drop_down1">
<option selected>Choose One</option>
<option>Professional Photographer - Full Time</option>
<option>Professional Photographer - Part Time</option>
<option>Intermediate/Advanced Photographer</option>
<option>Amateur/Novice Photographer</option>
</select>
<select size="1" name="drop_down2">
<option selected>Choose One</option>
<option>Wildlife</option>
<option>Plant Life</option>
<option>Landscape</option>
<option>Macro</option>
</select>
and here is the mailer2.php they are referred to as:
<?php
if(isset($_POST['submit'])) {
$to = "XXXXXXX";
$subject = "Registration Form";
$name_field = $_POST['name'];
$phone_field = $_POST['phone'];
$cell_field = $_POST['cell'];
$email_field = $_POST['email'];
$address_field = $_POST['address'];
$city_state_zip_field = $_POST['city_state_zip'];
[B]$multiple_field = $_POST['multiple'];
$drop_down1_field = $_POST['drop_down1'];
$drop_down2_field = $_POST['drop_down2'];[/B]
$referred_field = $_POST['referred'];
$emer_contact_field = $_POST['emer_contact'];
$relation_field = $_POST['relation'];
$emer_home_field = $_POST['emer_home'];
$emer_cell_field = $_POST['emer_cell'];
$equipment_field = $_POST['equipment'];
$CC_name_field = $_POST['cc_name'];
$date_field = $_POST['date'];
$message_field = $_POST['message'];
$body = "Name: $name_field\n Home Phone: $phone_field\n Cell Phone: $cell_field\n E-Mail: $email_field\n Address: $address_field\n City,State,Zip: $city_state_zip_field\n [B]Workshop: $multiple\n Photography Level: $drop_down1\n Photography Interest: $drop_down2\n[/B] Referral: $referred_field\n Emergency Contact: $emer_contact_field\n Relation: $relation_field\n Home: $emer_home_field\n Cell: $emer_cell_field\n Equipment: $equipment_field\n Agreed: $cc_name_field\n Date: $date_field\n Message:\n $message_field\n";
echo "Data has been submitted to $to!";
mail($to, $subject, $body);
} else {
echo "Data was not sent!";
}
?>
Do I need some sort of foreach() argument to capture that data? The rest of the fields are coming through just fine.