Changing value of a session variable when submitting a form
Posted: Sun May 25, 2003 12:44 pm
Hi all
I built an application where a single php file displays different pages. In every page there are some forms, some submit buttons and in every form there is an hidden variable called "state". Every action redirects to the same file.
Every page is visualized with a function so that the main body of the application is something like :
if state has not been set yet, visualize page 0
if state == 0 visualize page 0
if state == 1 visualize page 1
and so on.
Now, i'd like to do that with session variables and i'd like to completely avoid the use of hidden variables. ( BTW, is it true that hidden variables could be easily exploited to create security flows ? ).
Is it possible to change the value of a Session variable when submitting the form. Please, without using OnSubmit or other Javascript.
I'd appreciate , if not a complete answer, at least some redirection to a good and exaustive tutorial: i couldnt find any that explain this apparently simple topic.
Thankx !
Wentu
I built an application where a single php file displays different pages. In every page there are some forms, some submit buttons and in every form there is an hidden variable called "state". Every action redirects to the same file.
Every page is visualized with a function so that the main body of the application is something like :
if state has not been set yet, visualize page 0
if state == 0 visualize page 0
if state == 1 visualize page 1
and so on.
Now, i'd like to do that with session variables and i'd like to completely avoid the use of hidden variables. ( BTW, is it true that hidden variables could be easily exploited to create security flows ? ).
Is it possible to change the value of a Session variable when submitting the form. Please, without using OnSubmit or other Javascript.
I'd appreciate , if not a complete answer, at least some redirection to a good and exaustive tutorial: i couldnt find any that explain this apparently simple topic.
Thankx !
Wentu