Page is a not externally linkable
- Code, Content, and Presentation
-- PHP Server Side Scripting
---- Need advice: Global or Session variables


jbrevell - 1:17 pm on Mar 15, 2006 (gmt 0)


Beware with session variables, I've found that if a variable is set on page 1, then the user clicks through to page 2 and the variable is set to another value, you have to be very careful of the back button. In the scenario above, if the user clicks the back button to page 1, the session variables are reset to how they were on page 1.

I would give the user a UID, then populate a temp table at the top of step 4. Make sure step 3 checks for the UID in the temp table in case the user clicks the back button. When the user confirm in step 4, populate your permanent table

John


Thread source:: http://www.webmasterworld.com/php/12124.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com