Jump to content

Allowing The User To Select Information To Delete From Database


confused and dazed

Recommended Posts

Thanks for the initial feedback. It will be important to NOT show the user all the database information. They will need to remember two specific fields they previously entered, enter that data (somehow), and have the sripts delete that whole row. I think by your response that I will need to set up an id for each row - how to best do this?

Link to comment
Share on other sites

You just need a way to uniquely identify a row. If you have them just typing in values to delete, that may work, but they would be able to delete any row in that table unless you're checking permissions. If those two values are enough to uniquely identify a row then that would work as long as there are no misspellings or things like that. Otherwise, it's most common to use an integer autoincrement ID field for the table to identify each row. In that case you would need to list the rows and have them choose one to delete. If they aren't allowed to see everything, then you need a permission system to determine which rows they are allowed to view and delete.

Link to comment
Share on other sites

After they submit their form an e-mail is sent to their account with all the information they filled out. They will need to take that e-mail (if they cannot remember) and call out the two values. I have set up the insert function to only allow unique names within the form data to be able to be sent to the database. I know that some of the people will know each other so there is another field that I set up in the form (for the user to enter) that is sort of random so that only the user will know it really. So I'm sure I can identify a specific row. I will get to work on the logic code writing now...

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...