Example:
site.com/?deleted_smth=7f6ed62
7f6ed62 is unique and generated after a certain action completes. This ID is required to let the next request (redirect) know that a action was fired and completed, so it can display a certain message on the screen. After the message is displayed the ID is invalidated, so it can’t be used again. So if I reload the same link 10 times, the ID should become invalid after then 1st request.
How can I find out if the ID is valid?
Right now the only possible way I see is to store the ID inside the database 🙁
Then after I do the check, I remove it from the db…
Are there any better solutions?
Store it in a session (
$_SESSION['..']) and delete after the first request.