Ok i have a 3 page form that I am creating for a site and on page2 (aka step2.php) I have 30 checkboxes each representing a type of food. The customer will check all boxes that apply of foods they make at their establishment. I need to find a way to take all checked checkboxes and insert them into a session to be displayed onto “page4” and then able to be changed if needed (go back to page2 to make corrections/changes) and once complete I need to insert all the checked checkboxes into my db. Now I have taken many swings at this with no luck yet. Here is my code.
This is the form…
[code=php]<form method=”POST” enctype=”multipart/form-data” name=”cuisine” action=”step3.php”>
<div align=”left”><h2><font color=”#b80101″>Types of Cuisine</font></h2></div>
<fieldset align=”center”>
<table>
<tr>
<td><input type=”checkbox” name=”food[]” value=”afghan”/></td><td>Afghan</td>
<td><input type=”checkbox” name=”food[]” value=”caribbean”/></td><td>Caribbean</td>
<td><input type=”checkbox” name=”food[]” value=”greek”/></td><td>Greek</td>
<td><input type=”checkbox” name=”food[]” value=”korean”/></td><td>Korean</td>
<td><input type=”checkbox” name=”food[]” value=”pizza”/></td><td>Pizza</td>
<td><input type=”checkbox” name=”food[]” value=”swedish”/></td><td>Swedish</td>
</tr>
<tr>
<td><input type=”checkbox” name=”food[]” value=”american”/></td><td>American</td>
<td><input type=”checkbox” name=”food[]” value=”chinese”/></td><td>Chinese</td>
<td><input type=”checkbox” name=”food[]” value=”indian”/></td><td>Indian</td>
<td><input type=”checkbox” name=”food[]” value=”lebanese”/></td><td>Lebanese</td>
<td><input type=”checkbox” name=”food[]” value=”peruvian”/></td><td>Peruvian</td>
<td><input type=”checkbox” name=”food[]” value=”sweets”/></td><td>Sweets</td>
</tr>
<tr>
<td><input type=”checkbox” name=”food[]” value=”appetizers”/></td><td>Appetizers</td>
<td><input type=”checkbox” name=”food[]” value=”cuban”/></td><td>Cuban</td>
<td><input type=”checkbox” name=”food[]” value=”irish”/></td><td>Irish</td>
<td><input type=”checkbox” name=”food[]” value=”mediterranean”/></td><td>Mediterranean</td>
<td><input type=”checkbox” name=”food[]” value=”portuguese”/></td><td>Portuguese</td>
<td><input type=”checkbox” name=”food[]” value=”thai”/></td><td>Thai</td>
</tr>
<tr>
<td><input type=”checkbox” name=”food[]” value=”brazilian”/></td><td>Brazilian</td>
<td><input type=”checkbox” name=”food[]” value=”french”/></td><td>French</td>
<td><input type=”checkbox” name=”food[]” value=”italian”/></td><td>Italian</td>
<td><input type=”checkbox” name=”food[]” value=”mexican”/></td><td>Mexican</td>
<td><input type=”checkbox” name=”food[]” value=”southwestern”/></td><td>South Western</td>
<td><input type=”checkbox” name=”food[]” value=”turkish”/></td><td>Turkish</td>
</tr>
<tr>
<td><input type=”checkbox” name=”food[]” value=”cajun&creole”/></td><td>Cajun & Creole</td>
<td><input type=”checkbox” name=”food[]” value=”german”/></td><td>German</td>
<td><input type=”checkbox” name=”food[]” value=”japanese”/></td><td>Japanese</td>
<td><input type=”checkbox” name=”food[]” value=”middle_eastern”/></td><td>Middle Eastern</td>
<td><input type=”checkbox” name=”food[]” value=”spanish”/></td><td>Spanish</td>
<td><input type=”checkbox” name=”food[]” value=”vietnamese”/></td><td>Vietnamese</td>
</tr>
</table>
</fieldset>
<a href=”step3.php”><img src=”img/step3.gif” alt=”” border=”0″></a>
</form>
So first do I need to do name=”food[]” for all check boxes?
second, how do I now go about capturing all checked boxes displying the text for each of them onto another page and then set it up to be inserted into a db?
Any help on this would be greatly appreciated since all attempts I have made have failed.
thanks for all the help.