checkboxes in loop
Posted: Mon Mar 19, 2007 1:00 pm
Hi,
I have loop that gets all the records from a table in a database.
I use the following to query the database and extract the data:
At the end of each row fetched from the database i have inserted an html checkbox.
Assume the query returns 10 rows of data and the user 'ticks' 5 checkboxes and clicks the form submit button.
How can I determine which database rows have been 'ticked', as more than one has been ticked?
Thanks
I have loop that gets all the records from a table in a database.
I use the following to query the database and extract the data:
Code: Select all
$query = "SELECT * FROM table1";
$result = mysql_query($query) or die(mysql_error());
while($row=mysql_fetch_array($result))
{
extract($row);
display rows
}Assume the query returns 10 rows of data and the user 'ticks' 5 checkboxes and clicks the form submit button.
How can I determine which database rows have been 'ticked', as more than one has been ticked?
Thanks