Jump to content

Checkbox delete?


Twango
 Share

Recommended Posts

I have a database, where i delete from a php page. I want to make it automatically delete everything in a checkbox.It deletes to a page <a href="delete.php?usertodelete=xxx&modpassword=xxx">HELP me i need to make it do it automatically

Link to comment
Share on other sites

um, this seems pretty vague. do you have some code at least? Are you saying you have an HTML table outputted with information that you want deleted from a database table if someone selects a checkbox? If so, What you need is to assign a meaningful value or id or something to the checkbox, to distinguish it from all the other checkboxes. The simplest way is to give it an ID that correlates to an ID of a row in the database table you want to delete from. If you want it done automatically, you need to use javascript to have it make a call to a script and takes the ID and then runs a query using that identifier. Otherwise, you can just use a form and a submit button.

Edited by thescientist
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...