In your form or form part of you script, introduce something like this to retrieve the user names from the table:
PHP Code:
$sql = "SELECT * FROM tblGroup ORDER BY user_name ASC";
$qry = mysql_query($sql) or die("SQL Error: $sql<br>" . mysql_error());
WHILE ($r = mysql_query($qry)) :
echo "<input type='checkbox' name='frm_user_name[]' value='" . $r['user_name'] . "'>" . $r['user_name'] . "<br>";
ENDWHILE;
//rest of form...
?>
When you're ready to process the form, you would retrieve the checked user names as follows:
PHP Code:
$arrUserList = $_POST['frm_user_name'];
FOREACH ($arrUserList as $key => $thisUSER) :
echo "or whatever you want to do with " . $thisUSER . "<br>";
ENDFOREACH;
Something to consider: If you're going to store a list of users, you should store their user ID rather than user name as above.
Bookmarks