Ok, you will have to go with one problem at a time.
1. The form:
Let's say you have 5 items.
<input type="checkbox" name="item" value="1">
<input type="checkbox" name="item" value="1">
<input type="checkbox" name="item" value="1">
<input type="checkbox" name="item" value="1">
<input type="checkbox" name="item" value="1">
- <input type="checkbox" name="item" value="1">
- <input type="checkbox" name="item" value="1">
- <input type="checkbox" name="item" value="1">
- <input type="checkbox" name="item" value="1">
- <input type="checkbox" name="item" value="1">
The resulting POST of the form should (and you need to try this first) make an array variable named item with five elements:
$item[0]
$item[1]
$item[2]
$item[3]
$item[4]
Each one with a value of 0 or 1.
1 for checked items
0 for unchecked items
Use a "debug" script for being sure about it. Create a PHP like this:
<?
$item = $_POST['item']; // You need this if globals is Off
for ($i=0; $i<5; $i++) {
print("Item $i = ".$item[$i]."<br>");
}
?>
- <?
- $item = $_POST['item']; // You need this if globals is Off
- for ($i=0; $i<5; $i++) {
- print("Item $i = ".$item[$i]."<br>");
- }
- ?>
Then post your form to that script. You will be able to know if the checkboxes are being reflected in the array variable.
2. You need to start by knowing HOW will you store the data. Let's say you have a table of links with:
int() link_id
varchar() link
bool update
In this case you will need to pass the link_id along with the checkbox state. But there are many ways to solve it. If you already have a data model, post it here. If not, you need to build one.