Re: how to prevent getting the variables after a browser reload function.

From: Date: Thu, 15 Jun 2000 22:32:25 +0000
Subject: Re: how to prevent getting the variables after a browser reload function.
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-21474@lists.php.net to get a copy of this message
On Thu, 15 Jun 2000, XFred . wrote: > I created a forum with php3. > But when the user has posted his article, if he reloads the page, my script > re-insert the post into my forum file... > > I encountered this problem in other forums, moreover I'm not decided to use > a database for a single problem like this ... > Anyone can help ? What you do is generate a unique ID for the post _before_ displaying the post form and put it into a hidden input element. Then when the user submits the form, you use that ID to insert the post, but you have to either check that that ID is not already present or have unique index on that field. -Andrei * We reason deeply, when we forcibly feel. *

« previous php.dev (#21474) next »