On Dec 12, 2007 10:35 AM, navien amirtharaj <[EMAIL PROTECTED]> wrote:
>
> How to clear the $_POST[] data in php. if i refresh a page the data's are 
> submitting again. How to prevent?
>
>

The best way I have found to do this is to redirect the user to the
page once you've finished with the post data.  Since it's the browser
that chooses to send the post data when you reload.  Try something
like this after you've finished using the post data, you'll need to
make sure you've done *no* output otherwise the header will not work!

header('Location: http://'. $_SERVER['HOST_NAME'] . $_SERVER['REQUEST_URI');
exit;

Reply via email to