Quoting "Ashley M. Kirchner" <[EMAIL PROTECTED]>:
>     PayPal passes a ton of data back to us when someone's done 
> purchasing something.  I use some of that information and shove it all 
> into a database.  Problem is, if someone hits reload on their browser, I 
> get the same data re-inserted again.  Reload the page four times, and I 
> will get four records with the same data inserted.  How can I avoid 
> this?  I'd like to silently either discard the information after it's 
> been inserted, or silently prevent it from being re-inserted again.

1. Receive PayPal data in your script.
2. Process it (stick into database).
3. Redirect to another script and forward any data you want displayed.
4. Have the 2nd script show whatever confirmation message you want.

The user can now reload all he wants, he gets just the 2nd script
which doesn't do anything but display the same message over and over.

ATTENTION: if you receive the PayPal data by POST be sure to redirect
using "303 See Other", which will "deactivate" the POST and force the
redirect to use GET. Of course, forwarding any data to the 2nd script
should be done as GET parameters.

Or, even better, just forward the 2nd script the database ID of the
data you just recorded and if it needs to display anything it can get
it from there.

-- 
Romanian Web Developers - http://ROWD.ORG

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

Reply via email to