Hello to everyone,
This is probably very simple but I can’t figure it for the life of me. All I want is for the marked boxes to come through and all I keep getting is the last one. I am about ready to take a hammer to my personal confuser.
[code]
Let’s Get Personal…
-
Name
-
Email
</ul>
</fieldset>
<fieldset class="study">
<legend>Favorite Type(s) of Food</legend>
<ul>
<li>
<label for="cuisine" class="text"> You can choose more than one by holding the "ctrl" button.</label>
<select name="cuisine[]" multiple id="cuisine" tabindex="60">
<option value="american">American</option>
<option value="bakery_deli">Bakery/Deli</option>
<option value="bbq">Barbeque</option>
<option value="chinese">Chinese</option>
<option value="coffee">Coffeeshop</option>
<option value="greek">Greek</option>
<option value="italian">Italian</option>
<option value="latin">Latin</option>
<option value="pizza">Pizza</option>
<option value="portuguese">Portuguese</option>
<option value="scottish-irish">Scottish/Irish</option>
<option value="spanish">Spanish</option>
</select>
</li>
<li class="group">If you would like information regarding any of the topics below, please check the one(s) that apply:</li>
<li>
<input name="info[]" type="checkbox" id="ssl" tabindex="70" value="ssl">
<label for="ssl">Student Specials</label><br>
<input name="info[]" type="checkbox" id="ads" tabindex="80" value="ads">
Advertising
<br>
<input name="info[]" type="checkbox" id="spotlight" tabindex="90" value="spotlight">
<label for="spotlight">Restaurant Spotlight</label><br>
<input name="info[]" type="checkbox" id="general" tabindex="100" value="general">
<label for="general">General Listing</label>
</li>
<li class="group">Would you like to join our email list?</li>
<li>
<label>
<input type="radio" name="list" value="yes" id="list_0" tabindex="110">
yes</label><br>
<label>
<input type="radio" name="list" value="no" id="list_1" tabindex="120">
not at this time</label>
</li>
<li>
<label for="comments" class="text">Additional comments</label>
<textarea name="comments" id="comments" tabindex="130"></textarea>
</li>
<li>
<input type="submit" name="submit" id="submit" value="Request Info" tabindex="140">
</li>
</ul>
</fieldset>
[/code]
Here is the php
[php]<?php
$emailSubject = ‘Information Request’;
$webMaster = ‘[email protected]’;
$name = $_POST[‘name’];
$email = $_POST[‘email’];
if($_POST[‘cuisine’]!=null){
foreach ($_POST[‘cuisine’] as $key => $value) {
$cuisine.=($key==0)?$value:",".$value;
$info = $_POST[‘info’];
$list = $_POST[‘list’];
}
}
$comments = $_POST[‘comments’];
$body = "
Name: $name
Email: $email
Type of Food: $cuisine
Info: $info
Subscribe: $list
Comments: $comments
EOD";
$headers = “From: $email\r\n”;
$headers .= “Content=tpye: text/html\r\n”;
$success = mail($webMaster, $emailSubject, $body, $headers);
header(‘Location: recommendConfirm.htm’);
?>[/php]
Like I said, everything works except for the checkboxes.
Thank you very much in advance for any help.