PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a script running to make a deletion link and it works but when you click it, it deletes the record but it also keeps the link until you refresh the page.
So like lets say it was like
Bob | *link*Delete?*link*
You click the delete link, the record is no longer in the database but the line above still shows until you refresh the page. Is there anyway to stop this from happening? Also here is my code if it helps ignore all the if statements I know switch/case would have been better I'm just too lazy to go change them right now.
This code does something similar to what you want but it's one page being used over and over. You have a page that displays all the records with a delete link next to them, as per your example. In the code i created i used that same page to also delete the record. When you access the page, there is no query string set. Once you click on the delete link the page is opened (same page) this time with a querystring that carries the name 'ID' and value of the record id out of the database. The script checks whether or not the querystring has been set, if not the page displays all records. If the value is set, the script deletes that selected record, then again displays all records from the database.