help...i have a looped output of checkboxes in a form, and when i press "submit" i want to have them UPDATE all the corresponding records WHERE id='$id'...i'm just not sure how to do this...
this is the UPDATE query...as it is...it's only holding one set of values...
// multiple updates...
if ($submit) {
$result = mysql_query ("UPDATE main SET id='$id', admin2='$admin2' WHERE id='$id'") or die ("Not working! [2a]");
header("Location: page.php");
}
this is what the form part looks like...i'm not pasting the code because the phpbuilder system keeps playing with the url and making it unreadable...it simply looks like this...
http://www.someurl.com/link.php?id=12 [checkbox-checked-value=1-name=admin2]
looped 15 times...
this is the query that provides the information FOR the outputs i use in the checkbox/form part...
// load first query...
$query = mysql_query ("SELECT html,id FROM main WHERE admin1='1' and admin2='0' ORDER BY id ASC LIMIT 0,15 " ) or die ("Not working! [1a]");
$row = mysql_fetch_array($query);
any help would be much appreciated...i hope i've provided enough info...jv