I'm struggling to find a good example of using checkboxes to delete records from a database. I currently have a table that I would like to display to the user which they can then select multiple entries from and delete. So far I have this small piece of code which takes the data from the table and assigns a checkbox to it but I don't really have an idea how to take it further.
<? while($info = mysql_fetch_array($data))
{
echo "<tr>";
echo "<td>".$info['genre'] . "</td><td><input type = checkbox name = dgenre value =".$info['genre_id'] . "></td>";
echo "</tr>";
}
?>
Question
ciba
I'm struggling to find a good example of using checkboxes to delete records from a database. I currently have a table that I would like to display to the user which they can then select multiple entries from and delete. So far I have this small piece of code which takes the data from the table and assigns a checkbox to it but I don't really have an idea how to take it further.
Please help!
Edited by cibaLink to comment
Share on other sites
5 answers to this question
Recommended Posts