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). Quote Link to comment 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()); } Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.