I have a table which displays a list of locations.
One of the columns in that table is called "showonwebsite".
If the db contains a "y" for a specific record, it checks the box.

I am trying to do it so when the website admin checks the box, for multiple records in the table and presses submit, it adds the 'y' to those records.
So far this is working.

The problem is when they "uncheck" a record, I cant find a way to make it remove the 'y' from the database.

Here is what I have.

HTML Code:
<form action="managelocations.php" method="post">
<input <?php if (!(strcmp($row_rsActiveLocations['showinfooter'],"y"))) {echo "checked=\"checked\"";} ?> name="checkbox[]" type="checkbox" id="checkbox[]" value="<?php echo $row_rsActiveLocations['locationsid']; ?>">
<input name="submit" type="submit" value="submit"/>
PHP Code:
if(isset($_POST['checkbox'])){$update $_POST['checkbox'];
foreach (
$update as $value) {
$query "UPDATE locations SET showonwebsite='$option' WHERE locationsid = $value"
$Result mysql_query($query$db) or die(mysql_error());

I have tried toying with if thens and all types of variations but no luck.
Anyones help is truly appreciated!