Hello.
I have a list bveing generated from a database.
This list is made up of links with ?id= apapeded to the end, so the link will then open up the appropriate page when it is clicked.
What I'm looking to do is add a checkbox next to each item, and with javascript ( which i know how to do) submit the form on checkbox click.
Here's the code i have so far.
while ($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td><a href="titleEdit.php?id=' . $row['id'] . '">' . $row['title'] . '</td>';
'<td><input type="checkbox" name="enabled" value="0"></td>';
echo '</tr>';
}
So, when someone clicks on the box, it should set the value of "eanbled" for the row with the correct ID to 1 ( boolean).
My issues are.
1) How to get it to POST to itself and show the updated list correctly. Including when I first come to the page and there is no POST yet.
2) How to only change the "enabled" value on the row with the same ID, since all the checkboxes have the same name.
thanks to all