Re: duplicate entry

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

 



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 <stuttle@xxxxxxxxx>/* 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? <http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367> Enjoy some healthy debate in the Yahoo! Answers Food & Drink Q&A. <http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396545367>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


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

  Powered by Linux