Re: [PHP] Clear POST variables

2006-02-18 Thread John Wells
[snip] If it's not wrong for me to push the back button, why are you breaking it with all your re-directs :-) [/snip] I was a bit short in my explanation -- I tend to use the redirect method so that users *can* use the back button (or refresh). I'm trying to *not* break it. :) That said, the

Re: [PHP] Clear POST variables

2006-02-18 Thread Kim Christensen
On 2/18/06, John Wells [EMAIL PROTECTED] wrote: That said, the unique token method is very interesting, I'll definitely check it out. But I'm curious, if you check for an existing token and do find one (so the user has possibly refreshed the browser), don't you have to program a particular

[PHP] Clear POST variables

2006-02-16 Thread Mike Tuller
I have a page that submits form information into a database, and all is good, but someone testing the page pointed out something to me that I didn't notice. I have a form that sends you to another page that submits the data into a database. If you refresh the page, the information is submitted

Re: [PHP] Clear POST variables

2006-02-16 Thread John Wells
I'm curious to hear what others say, but I tend to build into my application flow a header(Location: someurl) redirect after a form submission. It's just as if you were to include(somefile) the resulting page, but by using header() you are moving the user away from the action so that this sort of

RE: [PHP] Clear POST variables

2006-02-16 Thread Gustafson, Tim
/ -Original Message- From: John Wells [mailto:[EMAIL PROTECTED] Sent: Thursday, February 16, 2006 10:15 AM To: php list Subject: Re: [PHP] Clear POST variables I'm curious to hear what others say, but I tend to build into my application flow a header(Location: someurl) redirect after

RE: [PHP] Clear POST variables

2006-02-16 Thread Jay Blanchard
[snip] How do I clear out the POST variables, or the variables that I have set from the POST variables, so that when the page is refreshed it will not resubmit. I have tried unset() and have tried to set it to and empty value, but it doesn't seem to work. [/snip] At the end of the database

Re: [PHP] Clear POST variables

2006-02-16 Thread Larry E. Ullman
How do I clear out the POST variables, or the variables that I have set from the POST variables, so that when the page is refreshed it will not resubmit. I have tried unset() and have tried to set it to and empty value, but it doesn't seem to work. You can clear out POST by doing this:

RE: [PHP] Clear POST variables

2006-02-16 Thread Dan Parry
15:07 To: php list Subject: [PHP] Clear POST variables I have a page that submits form information into a database, and all is good, but someone testing the page pointed out something to me that I didn't notice. I have a form that sends you to another page that submits the data into a database

Re: [PHP] Clear POST variables

2006-02-16 Thread Mike Tuller
:[EMAIL PROTECTED] Sent: 16 February 2006 15:07 To: php list Subject: [PHP] Clear POST variables I have a page that submits form information into a database, and all is good, but someone testing the page pointed out something to me that I didn't notice. I have a form that sends you to another page

Re: [PHP] Clear POST variables

2006-02-16 Thread Kim Christensen
On 2/16/06, Mike Tuller [EMAIL PROTECTED] wrote: How do I clear out the POST variables, or the variables that I have set from the POST variables, so that when the page is refreshed it will not resubmit. I have tried unset() and have tried to set it to and empty value, but it doesn't seem to

Re: [PHP] Clear POST variables

2006-02-16 Thread tedd
On 2/16/06, Mike Tuller [EMAIL PROTECTED] wrote: How do I clear out the POST variables, or the variables that I have set from the POST variables, so that when the page is refreshed it will not resubmit. I have tried unset() and have tried to set it to and empty value, but it doesn't seem to

Re: [PHP] Clear POST variables

2006-02-16 Thread Richard Lynch
On Thu, February 16, 2006 9:07 am, Mike Tuller wrote: How do I clear out the POST variables, or the variables that I have set from the POST variables, so that when the page is refreshed it will not resubmit. I have tried unset() and have tried to set it to and empty value, but it doesn't

RE: [PHP] Clear POST variables

2006-02-16 Thread Richard Lynch
On Thu, February 16, 2006 9:14 am, Dan Parry wrote: Submit the data to a page that just inserts it into the DB (validating it first, natch) then do a header(location) to the thank you (or whatever) page This also fixes 'page expired' warnings I've tried this... Depending on the speed of

Re: [PHP] Clear POST variables

2006-02-16 Thread Richard Lynch
On Thu, February 16, 2006 1:23 pm, Richard Lynch wrote: if (isset($_POST['example'])){ D'oh! Either add an INPUT named example or change this line to token instead of example Need caffiene. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Clear POST variables

2006-02-16 Thread Richard Lynch
On Thu, February 16, 2006 9:15 am, John Wells wrote: I'm curious to hear what others say, but I tend to build into my application flow a header(Location: someurl) redirect after a form submission. It's just as if you were to include(somefile) the resulting page, but by using header() you are

Re: [PHP] Clear POST variables

2006-02-16 Thread Curt Zirzow
On Thu, Feb 16, 2006 at 01:23:23PM -0600, Richard Lynch wrote: On Thu, February 16, 2006 9:07 am, Mike Tuller wrote: How do I clear out the POST variables, or the variables that I have set from the POST variables, so that when the page is refreshed it will not resubmit. I have tried

Re: [PHP] Clear POST variables

2006-02-16 Thread Curt Zirzow
On Thu, Feb 16, 2006 at 02:07:33PM -0600, Richard Lynch wrote: On Thu, February 16, 2006 9:15 am, John Wells wrote: I'm curious to hear what others say, but I tend to build into my application flow a header(Location: someurl) redirect after a form submission. It's just as if you were to

Re: [PHP] Clear POST variables

2006-02-16 Thread Mike Tuller
I am not using a session, and redirecting I think would be a bad way of doing this because of the potential hit that the server would take for every insert. I have done a few pages like this, and never ran into this situation. Now I need to go back and fix this. Basically all I have is

Re: [PHP] Clear POST variables

2006-02-16 Thread Curt Zirzow
On Thu, Feb 16, 2006 at 09:34:12PM -0600, Mike Tuller wrote: ... This is how I learned in some book somewhere. Is everyone saying that I need to either use sessions, or redirect so that when someone refreshes insert.php, it doesn't submit the information again? To me it seems that

[PHP] Clear POST variables on page refresh

2005-02-03 Thread Richard Morley
I'm not sure if this is specifically a PHP problem, but here we go. Is there a way to clear the POST variables when the user refreshes a page? Specifically, my webpage POSTs a form to update or delete a record from the database -- it POSTs to itself, however. But if the user then clicks

RE: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Chris W. Parker
Richard Morley mailto:[EMAIL PROTECTED] on Thursday, February 03, 2005 9:57 AM said: I'm not sure if this is specifically a PHP problem, but here we go. Is there a way to clear the POST variables when the user refreshes a page? [snip] I read something somewhere that seemed to imply this

Re: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Richard Lynch
Richard Morley wrote: I'm not sure if this is specifically a PHP problem, but here we go. Is there a way to clear the POST variables when the user refreshes a page? Specifically, my webpage POSTs a form to update or delete a record from the database -- it POSTs to itself, however. But if the

RE: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Chris W. Parker
Richard Lynch mailto:[EMAIL PROTECTED] on Thursday, February 03, 2005 11:26 AM said: A simple thing to do is to put an md5 hash into the POST data, then only do the insert if that md5 hash isn't already used when they hit refresh. This avoids the hassle of re-direct headers and trying

Re: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Ricky Morley
Richard Lynch mailto:[EMAIL PROTECTED] on Thursday, February 03, 2005 11:26 AM said: A simple thing to do is to put an md5 hash into the POST data, then only do the insert if that md5 hash isn't already used when they hit refresh. Thank you for your responses. One question: If I were to use

RE: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Richard Lynch
Chris W. Parker wrote: Richard Lynch mailto:[EMAIL PROTECTED] on Thursday, February 03, 2005 11:26 AM said: A simple thing to do is to put an md5 hash into the POST data, then only do the insert if that md5 hash isn't already used when they hit refresh. This avoids the hassle of

Re: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Richard Lynch
Ricky Morley wrote: Richard Lynch mailto:[EMAIL PROTECTED] on Thursday, February 03, 2005 11:26 AM said: A simple thing to do is to put an md5 hash into the POST data, then only do the insert if that md5 hash isn't already used when they hit refresh. Thank you for your responses. One

Re: [PHP] Clear POST variables on page refresh

2005-02-03 Thread Ricky Morley
You're wonderful. Thank you very much. On Thu, 3 Feb 2005 13:02:14 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: Ricky Morley wrote: Richard Lynch mailto:[EMAIL PROTECTED] on Thursday, February 03, 2005 11:26 AM said: A simple thing to do is to put an md5 hash into the POST data,

RE: [PHP] Clear POST variables on page refresh

2005-02-03 Thread trlists
On 3 Feb 2005 Richard Lynch wrote: If it was only two pages, and there was only one header() re-direct, fine. But what ends up happening is you get in the habit of doing this all over the place, and you have a mess of spaghetti logic spread over a hundred files. That is a problem with