did some digging around the boards and found some useful posts.
got my script working and hope that it will help others with similar problems.
here goes:
<?
include("connect.inc");
#if submit was pressed
if (isset($HTTP_POST_VARS['send'])) {
#foreach will create an error if it is started without any values
#so, we check if any checkboxes were ticked
if (isset($_POST['checkbox'])) {
#lets update the table
#every row (checkbox value=id) that was ticked will get the value of 1
foreach($_POST['checkbox'] AS $value) {
$query = mysql_query("UPDATE table set value='1' where id='$value'");
}
#now we'll construct a string that will exclude the id's that were already changed to 1 from our next query
$query_start = ' WHERE ';
foreach($_POST['checkbox'] AS $value) {
$query_array[] = "id!= '" . $value . "'";
}
#create the query string by combining the query array using "AND" as a delimiter
#and then update the unchecked values to 0
if ($query_array) {
$query_string = $query_start . implode(' AND ', $query_array);
$query2 = mysql_query("UPDATE table set value='0'$query_string");
}
#if no checkboxes weren't ticked (or were unticked) bu tsubmit was pressed...
#we will update all values to 0
} else {
$query3 = mysql_query("UPDATE table set value='0'");
}
#that's it
}
?>
<html>
<head>
<title>Untitled</title>
</head>
<body>
<FORM METHOD="post" action="test.php">
<INPUT TYPE="checkbox" NAME="checkbox[]" VALUE="1">1<br>
<INPUT TYPE="checkbox" NAME="checkbox[]" VALUE="2">2<br>
<INPUT TYPE="checkbox" NAME="checkbox[]" VALUE="3">3<br>
<INPUT TYPE="checkbox" NAME="checkbox[]" VALUE="4">4<br>
<INPUT TYPE="submit" NAME="send" VALUE="Send">
</FORM>
</body>
</html>