change session variables?

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply

Fri Oct 04, 2002 1:49 pm

You could have some code at the beginning which unsets the session variable. This would mean the session variable is only set once that form has been submitted (and if they go back to it, they'll have to do it again).

Or the other way is before you set the variable on the 'action' page, unset it first!

New php-forum User
New php-forum User
Posts: 7
Joined: Sun Sep 29, 2002 9:36 am

Mon Oct 07, 2002 12:30 am

Hello Jay

you can just update your session variables like

suppose you have a form like

<input type="text" name="xyz">

and in your action page you can code it like
$abc = $xyz // (the variable comming from form)

I am doing it so because the Form variables are Golbal ones and it will be cofusing to overwrite the global variables


Mon Oct 07, 2002 1:53 am

Err, hello

I personally use the SGAs, in which there's no need to explicitely declare a variable as a session variable! Your code would work, but it would be a little confusing.

Post Reply