How do I make checkboxes sticky?

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
Goldmund
-


Joined: 19 Feb 2005
Posts: 19
Location: Seattle, WA

PostPosted: Tue Mar 22, 2005 5:40 am    Post subject: How do I make checkboxes sticky? Reply with quote

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 View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Tue Mar 22, 2005 7:23 am    Post subject: Reply with quote

I think you need to add a readonly attribute to the input tags.
Back to top View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group