checkboxes + Selected
Posted: Tue Jul 26, 2005 11:31 pm
Hi,
I have 3 checkboxes with the name "car" only 1 of the 3 can be selected, but cant get it to display the correct box that was checked, it defaults to the last checkbox:
How should it be so the correct selected checkbox is checked when $_POST is set?
Cheers
I have 3 checkboxes with the name "car" only 1 of the 3 can be selected, but cant get it to display the correct box that was checked, it defaults to the last checkbox:
Code: Select all
<td><div align="right"><font color="000000">Beginner $4.95</font></div></td>
<td><input type="radio" name="car" value="blue" <?php echo isset($plan) ? 'checked="checked"' : ''; ?>></td>
</tr>
<tr>
<td><div align="right"><font color="000000">Standard $7.95</font></div></td>
<td><input type="radio" name="car" value="red" <?php echo isset($plan) ? 'checked="checked"' : ''; ?>></td>
</tr>
<tr>
<td><div align="right"><font color="000000">Advanced $10.95</font></div></td>
<td><input type="radio" name="car" value="orange" <?php echo isset($plan) ? 'checked="checked"' : ''; ?>></td>Cheers