Re: Update a SESSION_VAR on form submit

From: Date: Wed, 08 Aug 2001 01:47:43 +0000
Subject: Re: Update a SESSION_VAR on form submit
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61943@lists.php.net to get a copy of this message
If I hit reload and re-post the same data, you'll need to detect that somehow... 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 richard@zend.com address is an endangered species -- Use ceo@l-i-e.com 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 <pete@smackedout.com> Newsgroups: php.general To: <php-general@lists.php.net> 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 1)when > 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 >

« previous php.general (#61943) next »