I want to store 2 variables in a value, but I not sure with the syntax.
The scenario: I want to store $boothAlias and $day2 into checkbox value to be pass to other page.
<input name='totalDay[]' type='checkbox' value='$boothAlias.$day2'/>
My code segment
while($rows = mysql_fetch_array($result2)){
$boothAlias=$rows['boothAlias'];
$totalDay=$rows['totalDay'];
echo "<tr><td>$boothAlias</td>";
for ($day2 = 1; $day2 <= $totalDay; ++$day2) {
echo "<td><input name='totalDay[]' type='checkbox' value='$boothAlias.$day2'/></td>";
}
echo "</tr>";
}
I think you would be better off using hidden form fields to pass data like that to your processing script. The checkbox form object is really designed for returning checked/unchecked (true/false). Depending on the value of the checkbox you can process the code and variables accordingly.