Say i have this:
Code: Select all
<input type="checkbox" name="check1" checked>Code: Select all
if (empty($_POST['check1'])) {
//Do stuff here
}I have successfully named all my chekcboxes with those ids, but now i am stuck and cannot think of a way to retrieve, or find out if those and which ones are checked...
To make it clearer here is some totally wrong code that i am hoping you can help me with.
Code: Select all
$SQL = mysql_query("SELECT * FROM am_users");
while($Data = mysql_fetch_assoc($SQL)) {
//Here i need to check if the checkbox that has one particular id in the database has been checked...
if (empty($_POST['uidtakenfromdatabase'])){
//Do stuff
}
}Is there a better way to do what i am trying to do?
Thanks