drop down list email
- postonoh
- Newbie


- Joined: Feb 02, 2011
- Posts: 5
- Status: Offline
I am very new I get one piece working now have problem with drop down list.
I have a drop down list.
php code
Everthing shows up except for Number of attendees which is the drop down list
Please only reply with code and not a website reference.
I have a drop down list.
Code: [ Select ]
<form action="/casinorsvp2.php" id="casino_us" method="post">
<p align="left" class="label_name">How many are Attending?</p>
<p align="left" class="input_form"><select name="attendee[]" width="5">
<option value="1" >1</option>
<option value="2" >2</option></select></p>
<p align="left" class="label_name">Company </p>
<p align="left" class="input_form">
<input type="text" name="Company" />
</p>
<p align="left" class="label_name">Contact </p>
<p align="left" class="input_form">
<input type="text" name="Name" />
</p>
<p align="left" class="label_name">Email</p>
<p align="left" class="input_form">
<input type="text" name="Email" />
</p>
<p align="left" class="label_name">Address</p>
<p align="left" class="input_form">
<input type="text" name="Address" />
</p>
<p align="left" class="label_name">City</p>
<p align="left" class="input_form">
<input type="text" name="City" />
</p>
<p align="left" class="label_name">State</p>
<p align="left" class="input_form">
<input type="text" name="State" />
</p>
<p align="left" class="label_name">Zip Code</p>
<p align="left" class="input_form">
<input type="text" name="Zip_Code" />
</p>
<p align="left" class="label_name">Phone #</p>
<p align="left" class="input_form">
<input type="text" name="Phone_Number" />
</p>
<p align="left" class="label_name">I would like to enter the event via Flash Seats.</p>
<p align="left" class="input_form">
<select name="tickets" width="5">
<option value="Yes">Yes</option>
<option value="No">No</option></select></p>
<p align="left" class="label_name">Select Certification(s) </p>
<p align="left" class="input_form">
<label>FBE </label>
<input type="checkbox" name="ckboxGrp1[]" value="FBE" id="fbeBox" />
<label>MBE </label>
<input type="checkbox" name="ckboxGrp1[]" value="MBE" id="mbeBox" />
<label>SBE </label>
<input type="checkbox" name="ckboxGrp1[]" value="SBE" id="sbeBox" />
<label>VA </label>
<input type="checkbox" name="ckboxGrp1[]" value="VA" id="vaBox" />
</p>
<p></p>
<p></p>
<!--<p class="label_name">Message</p>
<p class="input_form" id="textarea">
<textarea name="Message" rows="5" cols="4" id="message_input"></textarea>
</p>
</p>-->
<p align="left" id="submit">
<input type="submit" value="Send" name="submitButton" class="button" />
</p>
</form>
<p align="left" class="label_name">How many are Attending?</p>
<p align="left" class="input_form"><select name="attendee[]" width="5">
<option value="1" >1</option>
<option value="2" >2</option></select></p>
<p align="left" class="label_name">Company </p>
<p align="left" class="input_form">
<input type="text" name="Company" />
</p>
<p align="left" class="label_name">Contact </p>
<p align="left" class="input_form">
<input type="text" name="Name" />
</p>
<p align="left" class="label_name">Email</p>
<p align="left" class="input_form">
<input type="text" name="Email" />
</p>
<p align="left" class="label_name">Address</p>
<p align="left" class="input_form">
<input type="text" name="Address" />
</p>
<p align="left" class="label_name">City</p>
<p align="left" class="input_form">
<input type="text" name="City" />
</p>
<p align="left" class="label_name">State</p>
<p align="left" class="input_form">
<input type="text" name="State" />
</p>
<p align="left" class="label_name">Zip Code</p>
<p align="left" class="input_form">
<input type="text" name="Zip_Code" />
</p>
<p align="left" class="label_name">Phone #</p>
<p align="left" class="input_form">
<input type="text" name="Phone_Number" />
</p>
<p align="left" class="label_name">I would like to enter the event via Flash Seats.</p>
<p align="left" class="input_form">
<select name="tickets" width="5">
<option value="Yes">Yes</option>
<option value="No">No</option></select></p>
<p align="left" class="label_name">Select Certification(s) </p>
<p align="left" class="input_form">
<label>FBE </label>
<input type="checkbox" name="ckboxGrp1[]" value="FBE" id="fbeBox" />
<label>MBE </label>
<input type="checkbox" name="ckboxGrp1[]" value="MBE" id="mbeBox" />
<label>SBE </label>
<input type="checkbox" name="ckboxGrp1[]" value="SBE" id="sbeBox" />
<label>VA </label>
<input type="checkbox" name="ckboxGrp1[]" value="VA" id="vaBox" />
</p>
<p></p>
<p></p>
<!--<p class="label_name">Message</p>
<p class="input_form" id="textarea">
<textarea name="Message" rows="5" cols="4" id="message_input"></textarea>
</p>
</p>-->
<p align="left" id="submit">
<input type="submit" value="Send" name="submitButton" class="button" />
</p>
</form>
- <form action="/casinorsvp2.php" id="casino_us" method="post">
- <p align="left" class="label_name">How many are Attending?</p>
- <p align="left" class="input_form"><select name="attendee[]" width="5">
- <option value="1" >1</option>
- <option value="2" >2</option></select></p>
- <p align="left" class="label_name">Company </p>
- <p align="left" class="input_form">
- <input type="text" name="Company" />
- </p>
- <p align="left" class="label_name">Contact </p>
- <p align="left" class="input_form">
- <input type="text" name="Name" />
- </p>
- <p align="left" class="label_name">Email</p>
- <p align="left" class="input_form">
- <input type="text" name="Email" />
- </p>
- <p align="left" class="label_name">Address</p>
- <p align="left" class="input_form">
- <input type="text" name="Address" />
- </p>
- <p align="left" class="label_name">City</p>
- <p align="left" class="input_form">
- <input type="text" name="City" />
- </p>
- <p align="left" class="label_name">State</p>
- <p align="left" class="input_form">
- <input type="text" name="State" />
- </p>
- <p align="left" class="label_name">Zip Code</p>
- <p align="left" class="input_form">
- <input type="text" name="Zip_Code" />
- </p>
- <p align="left" class="label_name">Phone #</p>
- <p align="left" class="input_form">
- <input type="text" name="Phone_Number" />
- </p>
- <p align="left" class="label_name">I would like to enter the event via Flash Seats.</p>
- <p align="left" class="input_form">
- <select name="tickets" width="5">
- <option value="Yes">Yes</option>
- <option value="No">No</option></select></p>
- <p align="left" class="label_name">Select Certification(s) </p>
- <p align="left" class="input_form">
- <label>FBE </label>
- <input type="checkbox" name="ckboxGrp1[]" value="FBE" id="fbeBox" />
- <label>MBE </label>
- <input type="checkbox" name="ckboxGrp1[]" value="MBE" id="mbeBox" />
- <label>SBE </label>
- <input type="checkbox" name="ckboxGrp1[]" value="SBE" id="sbeBox" />
- <label>VA </label>
- <input type="checkbox" name="ckboxGrp1[]" value="VA" id="vaBox" />
- </p>
- <p></p>
- <p></p>
- <!--<p class="label_name">Message</p>
- <p class="input_form" id="textarea">
- <textarea name="Message" rows="5" cols="4" id="message_input"></textarea>
- </p>
- </p>-->
- <p align="left" id="submit">
- <input type="submit" value="Send" name="submitButton" class="button" />
- </p>
- </form>
php code
Code: [ Select ]
$name = $_POST['Name'];
$email = $_POST['Email'];
$phone = $_POST['Phone_Number'];
$company = $_POST['Company'];
$address = $_POST['Address'];
$city= $_POST['City'];
$state = $_POST['State'];
$zip = $_POST['Zip_Code'];
$yes = $_POST['tickets'];
if (flashseed($yes) == "Yes")
if (isset($_POST['ckboxGrp1']))
{
$_POST['ckboxGrp1'] = implode(', ', $_POST['ckboxGrp1']);
}
$checkbox = $_POST['ckboxGrp1'];
foreach ($checkbox as $chkbx)
{
$checkbx .= "$chkbx\n";
}
$number = $_POST['attendee'];
foreach ($number as $num)
{
$ticket .= "$num\n";
}
$body = <<<EOD
<br><hr><br>
Company: $company <br>
Name: $name <br>
Email: $email <br>
Phone: $phone <br>
Address: $address<br>
City: $city <br>
State: $state <br>
Postal Code: $zip <br>
Tickets: $yes <br>
Number: $ticket <br>
Certification: $checkbx <br>
EOD;
$email = $_POST['Email'];
$phone = $_POST['Phone_Number'];
$company = $_POST['Company'];
$address = $_POST['Address'];
$city= $_POST['City'];
$state = $_POST['State'];
$zip = $_POST['Zip_Code'];
$yes = $_POST['tickets'];
if (flashseed($yes) == "Yes")
if (isset($_POST['ckboxGrp1']))
{
$_POST['ckboxGrp1'] = implode(', ', $_POST['ckboxGrp1']);
}
$checkbox = $_POST['ckboxGrp1'];
foreach ($checkbox as $chkbx)
{
$checkbx .= "$chkbx\n";
}
$number = $_POST['attendee'];
foreach ($number as $num)
{
$ticket .= "$num\n";
}
$body = <<<EOD
<br><hr><br>
Company: $company <br>
Name: $name <br>
Email: $email <br>
Phone: $phone <br>
Address: $address<br>
City: $city <br>
State: $state <br>
Postal Code: $zip <br>
Tickets: $yes <br>
Number: $ticket <br>
Certification: $checkbx <br>
EOD;
- $name = $_POST['Name'];
- $email = $_POST['Email'];
- $phone = $_POST['Phone_Number'];
- $company = $_POST['Company'];
- $address = $_POST['Address'];
- $city= $_POST['City'];
- $state = $_POST['State'];
- $zip = $_POST['Zip_Code'];
- $yes = $_POST['tickets'];
- if (flashseed($yes) == "Yes")
- if (isset($_POST['ckboxGrp1']))
- {
- $_POST['ckboxGrp1'] = implode(', ', $_POST['ckboxGrp1']);
- }
- $checkbox = $_POST['ckboxGrp1'];
- foreach ($checkbox as $chkbx)
- {
- $checkbx .= "$chkbx\n";
- }
- $number = $_POST['attendee'];
- foreach ($number as $num)
- {
- $ticket .= "$num\n";
- }
- $body = <<<EOD
- <br><hr><br>
- Company: $company <br>
- Name: $name <br>
- Email: $email <br>
- Phone: $phone <br>
- Address: $address<br>
- City: $city <br>
- State: $state <br>
- Postal Code: $zip <br>
- Tickets: $yes <br>
- Number: $ticket <br>
- Certification: $checkbx <br>
- EOD;
Everthing shows up except for Number of attendees which is the drop down list
Please only reply with code and not a website reference.
- Anonymous
- Bot


- Joined: 25 Feb 2008
- Posts: ?
- Loc: Ozzuland
- Status: Online
February 3rd, 2011, 9:18 am
- ndeb
- Newbie


- Joined: Feb 22, 2011
- Posts: 8
- Status: Offline
Try removing the [] after the attendee in line 3. It seems you are trying to use an array to get the value of the selected option but in getting your variable $number you are calling for attendee, not it's array ($_POST['attendee']).
I'd caution against leaving your variables unprotected like ($_POST)- it is a big security risk. Try protecting it with (mysql_real_escape_string($_POST[''])).
Hope this helps
I'd caution against leaving your variables unprotected like ($_POST)- it is a big security risk. Try protecting it with (mysql_real_escape_string($_POST[''])).
Hope this helps
Page 1 of 1
To Reply to this topic you need to LOGIN or REGISTER. It is free.
Post Information
- Total Posts in this topic: 2 posts
- Users browsing this forum: No registered users and 128 guests
- You cannot post new topics in this forum
- You cannot reply to topics in this forum
- You cannot edit your posts in this forum
- You cannot delete your posts in this forum
- You cannot post attachments in this forum
