Page 1 of 1
session help
Posted: Wed Feb 04, 2009 4:26 pm
by watsonw
i need help on this page i am coding... i need to make it not be able to go back and allow the users to enter in the same data or go back and repost same data....the error i am having is a user can create a "case" and then hit backspace and go back to the main menu and see redo the same work, duplicating himself...how can i stop this? thank you
Re: session help
Posted: Wed Feb 04, 2009 4:55 pm
by watson516
If you're using a db, you could check the entry against the db. If the user has entered that information before, redirect and error or just redirect to the page it would have redirected to if they had entered a new entry but with the old entry's information.
Re: session help
Posted: Wed Feb 04, 2009 5:01 pm
by requinix
Woah, weird, I thought you were replying to yourself
The typical answer is to put something into $_SESSION saying what data got entered, then when you do the insert you make sure that the data doesn't exist in $_SESSION already.
But really, what watson516 said is just as easy and doesn't require storing more information than necessary.
Re: session help
Posted: Wed Feb 04, 2009 5:02 pm
by Skoalbasher
I was about to post that.. ^^^^^^^^
edit: ok, not that, the one before it.