View previous topic :: View next topic |
Author |
Message |
Goldmund -
Joined: 19 Feb 2005 Posts: 19 Location: Seattle, WA
|
Posted: Tue Mar 22, 2005 5:40 am Post subject: How do I make checkboxes sticky? |
|
|
Here is a small section of my code where I want to have sticky checkboxes. If I use the method below, Every checkbox is checked when just one of the boxes is checked.
------------------------------------------------------------------------------------
...<tr valign=top><td width=10><input type=checkbox name="living[]" value="Alone"';
if ($_POST['living'] = 'Alone') {
echo 'checked="checked"'; } print ' >
</td><td width="206">Alone</td>
<td width="20"><input type=checkbox name="living[]" value="With kids"';
if ($_POST['living'] = 'Kids') {
echo 'checked="checked"'; } print ' >
</td><td>With kids</td></tr>...
-------------------------------------------------------------------------------------
How do I make checkboxes stick? Thanks! _________________ You learn something new every day. |
|
Back to top |
|
|
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Tue Mar 22, 2005 7:23 am Post subject: |
|
|
I think you need to add a readonly attribute to the input tags. |
|
Back to top |
|
|
|