Ask about general coding issues or problems here.
Moderators: macek, egami, gesf
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
- Posts: 7
- Joined: Sun Sep 29, 2002 9:36 am
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
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 2 guests