So I have a list of fonts on my website this have checkbox's to delete them... but I'm a little lost in how you would run the loop to delete them from a MySQL table
This is how I see it, you click Delete with 2 checkbox's ticked, this is grabbed by the delete page by using $_POST[ID] right but how do you use a foreach loop?
Code:
foreach($_POST['ID'] as $ID){
// some code
DB::query("DELETE FROM fonts WHERE ID='$_POST[ID][$ID]'");
}
Am I close to being correct, or am I going in completely the wrong direction?
Last edited by Sharkness; 12-20-2008 at 10:36 AM..
|