>
> 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.
>
> --
> W | I haven't lost my mind; it's backed up on tape somewhere.
> +--------------------------------------------------------------------
> Ashley M. Kirchner <mailto:[EMAIL PROTECTED]> . 303.442.6410 x130
What I usually do is send a header redirect back to the same page. Your DB
injection should occur before any HTML output. At the end of the DB
injection simply add:
header("Location:your_php_page.php");
exit;
This will reload that page and all the $_POST data will be removed. THen
you can hit refresh all you want.
--
--Matthew Sims
--<http://killermookie.org>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php