Funky_Monk Posted July 1, 2004 Share Posted July 1, 2004 Can someone tell me how to delete multiple records in a database using checkboxes (so that you can select the ones you want to delete). Link to comment https://forums.phpfreaks.com/topic/1884-multiple-delete/ Share on other sites More sharing options...
parksmike Posted July 2, 2004 Share Posted July 2, 2004 Hello, Your checkbox items are going to pass as an array. Try something like: foreach($checkbox as $key => $value){ $sql = mysql_query("delete from table where id = '$value'") or die(mysql_error()); } Link to comment https://forums.phpfreaks.com/topic/1884-multiple-delete/#findComment-6141 Share on other sites More sharing options...
Arenium Posted July 2, 2004 Share Posted July 2, 2004 Mhm, or you could be daring and gaze at some phpMyAdmin code for a while. I know, I know, it's not OOP, so it's a bit difficult to follow, but at least it works Link to comment https://forums.phpfreaks.com/topic/1884-multiple-delete/#findComment-6142 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.