954,576 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

PHP Confirm Delete

Is there a way to make a admin back end function to delete a MySQL entry after the user has click a button to confirm deletion.

I am trying to figure this out using statements and functions but I am hitting nothing but errors

adromidon
Newbie Poster
11 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

well there are multiple components to this, are you having trouble generating the MySQL script? Make sure to pass the unique id/primary key of the item you want to erase from the form.

DELETE FROM table_name WHERE unique_key='something';


or are you having trouble setting up the form? let me know a little more and i will be more than happy to help

paradox814
Posting Whiz
351 posts since Oct 2004
Reputation Points: 13
Solved Threads: 4
 

The delete i can accomplish it is showing the record then having the user click a button that says yes they want to dlete it then running the Query

I can only seem to accomplish one or the other when i try to display the record and then try to have it dlete when someone hits the dlete button it craps out i can seem to get a form variable where they insert the record ID hit submit and the next page deletes that record but i can not seem to get the displaying before deleteing and the deletion to mesh together

Does this make sense?

adromidon
Newbie Poster
11 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

If you have code you should post it...

DanceInstructor
Posting Whiz
368 posts since Feb 2005
Reputation Points: 17
Solved Threads: 14
 
If you have code you should post it...

I had code but i got so dang frustrated with this that i trashed the page but i am gonna see if i can remeber what i had as far as code

adromidon
Newbie Poster
11 posts since Apr 2005
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You