Jump to content

foreach loop


astralaaron

Recommended Posts

Say your checkboxes were named checkbox[]

foreach($_POST['checkbox'] as $checkbox) {	//Update the db table's column to read "1"	mysql_query("UPDATE table SET $checkbox = 1");}

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...