If I hit reload and re-post the same data, you'll need to detect that

Put a unique HIDDEN variable in your FORM, log it to the database when you
see it, and if you see it a second time, don't increment $Stage.

The other possiblity is to use:

<INPUT TYPE=HIDDEN NAME=Stage VALUE=<?php echo $Stage + 1;?>>

Any reload will simply pass back the same old Stage the browser got in the
first place.

WARNING [EMAIL PROTECTED] address is an endangered species -- Use
Wanna help me out?  Like Music?  Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Peter Dowie <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Saturday, August 04, 2001 4:05 PM
Subject: Update a SESSION_VAR on form submit

> hello,
> I have a Session variable $Stage which I want to update (increment by
> my form submit button is pressed.
> <FORM Method=\"post\" Action=\"$PHP_SELF\">
> how can I update this session variable ?
> I dont want to update it at the start of the script, because if the Reload
> button is pressed, it will keep updating it and it will mess up the script
> Please can someone help me out.
> Thanks
> Pete

PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to