Are you looking to store all of the results in one record? You said one
column. One column could mean one record or multiple records. If you are
unsure of the difference, please Google it. Storing an array in one
record / one column can be done many different ways, not just with
serialize though it is probably the most commonly used method. When the
form is submitted, simply check to make sure that form was submitted.
Inside the IF statement, serialize() the input method. For example:
Saturday, 28 April 2012
<table width="97%" border="0" align="left" style="margin-left:10px;">
<?php for($i=0; $i<sizeof($addressarray); $i++)
{
?>
<tr>
<td width="5%">
<input type="checkbox" name="name[]" value="<?php echo $addressarray1[$i];?>" />
</td>
<td width="47%"><?php echo $addressarray[$i];?></td>
<td width="5%"><input type="checkbox" name="title1[]" value="<?php echo $temporary['title1'];?>" /></td>
<td width="5%"><input type="checkbox" name="title2[]" value="<?php echo $temporary1['title2'];?>" /></td>
<td width="5%"><input type="checkbox" name="title3[]" value="<?php echo $temporary2['title3'];?>" /></td>
<td width="38%"></td>
<?php }?>
</tr>
<?php }?>
</table>
how to handle checkbox
<?php for($i=0; $i<sizeof($addressarray); $i++)
{
?>
<tr>
<td width="5%">
<input type="checkbox" name="name[]" value="<?php echo $addressarray1[$i];?>" />
</td>
<td width="47%"><?php echo $addressarray[$i];?></td>
<td width="5%"><input type="checkbox" name="title1[]" value="<?php echo $temporary['title1'];?>" /></td>
<td width="5%"><input type="checkbox" name="title2[]" value="<?php echo $temporary1['title2'];?>" /></td>
<td width="5%"><input type="checkbox" name="title3[]" value="<?php echo $temporary2['title3'];?>" /></td>
<td width="38%"></td>
<?php }?>
</tr>
<?php }?>
</table>
how to handle checkbox
Subscribe to:
Posts (Atom)