Hi,
If you name your checkbox check[]( or whatever name you like ) you will get an array in the post/get vars.
Then implode the array with commas and build a query using a IN operator.
A little sample will be clearer than my speech.
----8<----8<----
<?php
if (isset($submit)) {
$in = implode($check,",");
$sql = " UPDATE calendar SET ticket_status = 1 WHERE cal_id IN ( $in ) ";
/*
bla
bla
...
... Execute the statement here
...
bla
bla
*/
}
?>
<hr>
<form name=testform
method=GET
action=<? echo $PHP_SELF; ?>
<?php
for ( $i=0; $i< 10 ; $i++ ) {
/ Change the value of the checkbox from $i to cal_id[$i]
Where cal_id is an array of cal_ids
/
echo "<input type=checkbox name=\"check[]\" value=\"$i\">\n";
}
?>
<input type=submit name=submit value=Submit>
</form>
----8<----8<----
Try this, understand this and ask questions if not clear.
Hope this helps