Re: [PHP] HELP TO VALIDATE CHECKBOXES

2001-12-21 Thread Bogdan Stancescu
Ummm, though of this after I sent the e-mail: you may even perform the line after list($checked)... with an if in the query and skip the line altogether. But that may be a little too much... :-) Bogdan Bogdan Stancescu wrote: > while ($row = mysql_fetch_array($result)) > { >echo $row[

Re: [PHP] HELP TO VALIDATE CHECKBOXES

2001-12-21 Thread Bogdan Stancescu
while ($row = mysql_fetch_array($result)) { echo $row["name"]; list($checked)=mysql_fetch_row(mysql_query("select user_id from User_Category where user_id='$current_user' and category_id='".$row["category_id"]."'")); $checked=$checked?" checked":""; echo ''; } Hope this helps.

[PHP] HELP TO VALIDATE CHECKBOXES

2001-12-21 Thread Yogesh Mahadnac
Hi! I'm having some problems with checkboxes at the moment, and i'd be glad if you could help me solve it... i'll give a brief explanation of the situation first so that you can understand what i'm talking about :-) I have the tables 'User' (containing userid,etc), 'Category' (containing c