CanMan2004 Posted June 28, 2006 Share Posted June 28, 2006 HiI have a php question wondering if someone could answer it.What is the best way to stop php actions from happening more than once? For example I have a form which lets you register, the action of the form is?action=registeronce someone has completed the form it runs the aciton register and adds there details. If after, they click the back, then it retains there details and adds them again. What is the best way to stop people returning to a page if they have been there before?Thanks for any help in advanceDave Quote Link to comment https://forums.phpfreaks.com/topic/13120-php-question/ Share on other sites More sharing options...
hackerkts Posted June 28, 2006 Share Posted June 28, 2006 I'm not sure the best method, but I would useif(isset()) {} Quote Link to comment https://forums.phpfreaks.com/topic/13120-php-question/#findComment-50453 Share on other sites More sharing options...
freakus_maximus Posted June 28, 2006 Share Posted June 28, 2006 You should query the database to see if the user exists already. You could use a simple IF statement on the page that does the actual INSERT to do this and if they exist do not do the INSERT and display a message that they exist already. Quote Link to comment https://forums.phpfreaks.com/topic/13120-php-question/#findComment-50454 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.