Re: duplicate entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you it  works fine

Stut <stuttle@xxxxxxxxx> wrote:  sam rumaizan wrote:
> *"If the user hits refresh after submitting the form they will refresh
> nextpage.php. If they hit back they will be taken back to form.php"*
> Yes, *If the user hits refresh after submitting the form they will 
> refresh **
> *nextpage.php. Which is going to resubmit the data to mysql? (duplicate 
> entry)**

No, you didn't read what I wrote.

The form submits to formhandler.php which submits the data to MySQL and 
then redirects to nextpage.php. Nextpage.php *does not* submit any data 
to MySQL. Read my post again, carefully this time.

And please include the list when replying.

-Stut

> */Stut /* wrote:
> 
> sam rumaizan wrote:
> > How do I disable Refresh and Back button. to Prevent duplicate entry
> 
> Disabling client-side features like refresh and back is not the right
> way to solve this problem. The most common solution is to redirect the
> user to the next page from the form handler rather than outputting the
> next page from the form handler.
> 
> For example...
> 
> form.php shows the form, which submits to formhandler.php which
> processes the form and then does a header('Location: ...') redirect to
> nextpage.php.
> 
> If the user hits refresh after submitting the form they will refresh
> nextpage.php. If they hit back they will be taken back to form.php.
> 
> -Stut
> 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------
> Food fight? 
> 
> Enjoy some healthy debate
> in the Yahoo! Answers Food & Drink Q&A. 
> 
> 





 

 
---------------------------------
Don't pick lemons.
See all the new 2007 cars at Yahoo! Autos.

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux