Jump to content

Archived

This topic is now archived and is closed to further replies.

CanMan2004

Php Question

Recommended Posts

Hi

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

?action=register

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

Dave

Share this post


Link to post
Share on other sites
I'm not sure the best method, but I would use
if(isset()) {
}

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.