If the user hits the back button and then the forward, it sometimes
resubmits the form.
This is why i initiated the session and ended it at the end of the data
processing page. If they happen to press forward, or back, it will still not
initiate the form unless they have actually visitied and
I've found a way that works for me.
Using the START SESSION on the initial form, e.g.
?php
session_start();
// store session data
$_SESSION['form'] = 1;
?
and the using the code below in the processing form.
You can do a check if the user has already submitted the from by the initial
On Sun, 2008-12-07 at 16:44 +, Bhupendra Patel wrote:
I've found a way that works for me.
Using the START SESSION on the initial form, e.g.
?php
session_start();
// store session data
$_SESSION['form'] = 1;
?
and the using the code below in the processing form.
You can do a
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank form.
2) User fills in form.
3) User submits form.
4) Record is added to database.
5) Back to 1).
Go really back to 1) - use redirect. After the
Aren't we oversimplifying the issue assuming that the records inserted
cannot have everything duplicated but the autoincrement field?
If you are taking an order and the customer says 'hey, add another of this',
with the code below the system will reject it because it assumes that it is
a
I did something pretty similar to this but not with an MD5 hash. I used a
table which had just two fields, one autoincrement and another one a
boolean. When doing a form, I added one record to this table and the ID I
got from it is the one I sent in the form, the other field served to
On Tue, May 17, 2005 2:24 pm, Robert Meyer said:
Hello,
Scenario:
1) User is presented a blank form.
with an MD5 hash which is stored in the database as fresh
2) User fills in form.
3) User submits form.
4) Record is added to database.
That particular MD5 has is marked as used
5) Back
Force a reload of the document after step (4), you may use javascript to
reload this document, ie...
After step (4) add this line...
print scriptdocument.location.href='your-document-url';/script;
Assey.
On Tue, 17 May 2005, Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank
On Tue, 17 May 2005, Robert Meyer wrote:
As a last resort, I may have to do that, but that is by no means the
preferred method. I want to keep database access to a minimum.
I thought by this time this problem would have had a standard solution. It
would be nice if PHP had a function like
Next time, Mukasa, try reading... Robert clearly states that he'd like a
PHP function which TELLS him if the page has been refreshed or not
(thus, resent). There are headers sent out that indicate this, and
thus a function like refreshed() would be a shortcut to getting to know
if it has.
He
Robert Meyer wrote:
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank form.
2) User fills in form.
3) User submits form.
4) Record is added to database.
5) Back to 1).
Go really back to 1) - use redirect.
Sorry for that., i miss read that.. sorry, thought he wanted a php
function to
refresh the browser.
Assey.
On Wed, 18 May 2005, M. Sokolewicz wrote:
Next time, Mukasa, try reading... Robert clearly states that he'd like a PHP
function which TELLS him if the page has been refreshed or not
[snip]
6) User clicks refresh.
7) Another record is added, same data except auto-increment field.
How do I prevent these last two steps, or at least prevent a record
from being added when refresh is clicked?
[/snip]
Test for the existence (SELECT statement with the variables therein) of
the
Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank form.
2) User fills in form.
3) User submits form.
4) Record is added to database.
5) Back to 1).
Go really back to 1) - use redirect. After the record is added to the
database, use something like:
header('Location:
Why dont you check that data isnt being duplicated?
$query = SELECT auto_col FROM table where col1 = $var1 col2 = $var
3.;
$call_query = mysql_query($query,...
$query_data = mysql_assoc($call_query);
if(!$query_data) { do form }
else echo information already exists in database;
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank form.
2) User fills in form.
3) User submits form.
4) Record is added to database.
5) Back to 1).
Go really back to 1) - use redirect. After the
As a last resort, I may have to do that, but that is by no means the
preferred method. I want to keep database access to a minimum.
I thought by this time this problem would have had a standard solution. It
would be nice if PHP had a function like refreshed() so one could do ... if
17 matches
Mail list logo