Hi

Add a hidden field into the form with a unique transaction ID.

When the data is submitted first time save the transaction ID to a table.

Before you do anything check to see if the transaction ID exists in the
table, if not then you are ok to save the transaction ID and then add/update
the data.

If the ID is already there, then do not add/update and send the user a
message to say they have submitted the same transaction twice.

HTH

Peter



> -----Original Message-----
> From: Craig Hoffman [mailto:[EMAIL PROTECTED]
> Sent: 18 April 2004 01:30
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] Double Submission into DB if Hit Refresh
>
>
> What is the best way to avoid data being resubmitted (entered twice) to
> DB (mysql) if the user hits refresh after POSTING data via a form?
> __________________________________
> Craig Hoffman - eClimb Media
>
> v: (847) 644 - 8914
> f: (847) 866 - 1946
> e: [EMAIL PROTECTED]
> w: www.eclimb.net
> _________________________________
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

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

Reply via email to