Hi all,
i had written a query

$sql3="select userid from projectassign where projectassign='$projectassign'";
    while ($i < $num1)
        echo $userid;

so now i am getting some userid's. Now there are some checkboxes present in a table of users.Based on the query, userid's obtained i need to have them checked.
i got the userid's as 1,2,3 from the query.
Now there is checkbox to each users with userid 1,2,3,4,5. so wat i need is i need users having userid's 1,2,3 as checked in their checkboxes. so can any one please....
Thank u..

I'd just have one loop for 1..5 then as you output the html add an if() to check for projectassign , if true output the proper html attribute -- value="checked" or whatever it is.

Unchecked checkbox:

<input type="checkbox" />

Checked checkbox:

<input type="checkbox" checked="checked" />