Jump to content


Php Question

  • Please log in to reply
2 replies to this topic

#1 CanMan2004

  • Members
  • PipPipPip
  • Advanced Member
  • 254 posts

Posted 28 June 2006 - 03:45 PM


I 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


once 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 advance


#2 hackerkts

  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 28 June 2006 - 03:48 PM

I'm not sure the best method, but I would use
if(isset()) {


To be a coder, you must learn how to think and not to give up so easily.

#3 freakus_maximus

  • Members
  • PipPipPip
  • Advanced Member
  • 177 posts

Posted 28 June 2006 - 04:02 PM

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.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users