Board index   FAQ   Search  
Register  Login
Board index php forum :: php coding PHP coding => General

change session variables?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Postby Jay » 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!

Postby qadeerbk » 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
New php-forum User
New php-forum User
Posts: 7
Joined: Sun Sep 29, 2002 9:36 am

Postby Jay » 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.

Return to PHP coding => General

Who is online

Users browsing this forum: Google [Bot] and 3 guests

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.