Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

select check boxes and delete selected from database

Status
Not open for further replies.

mancroft

Programmer
Joined
Oct 26, 2002
Messages
267
Location
GB
Anyone know of a php/mysql script tutorial/demo for "select check boxes and delete selected from database"?
 
I would simply pass the id of the record to be deleted as the value of the checkbox...then its simply a matter of parsing the data into a comma separated string and runngin the query....
Code:
$sql="delete from tableName where ID in ($id_list)";


Bastien

Cat, the other other white meat
 
Follow basitenk's advice.
Make the input elements (checkboxes) an array <input name="delete_id[]" value="..., then you can just implode it into an id_list.
 
hello

the way i figured it out (eventually..way at the very very bottom) is here:

thread434-808086

hope that helps




 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top