PDA

View Full Version : session variables


Aymen++
04-29-2003, 05:55 PM
the first page of my website contains the username text box and the password text box (authrization page), when the user type his name and password and press the login button he'll go to the same page but at the top of the page there is a welcome followed by his name, even when the user move to another page and come back.
i did it by using the session_start() and session_register() functions to the variable username.
but my website contains many page like this forum, for example when you want to submit a new thread, at the top of the newthread page you'll see your name.
the problem is when i wanted to use the username variable in the newthread page in my website it was empty. how can i use the username in otherpages?

missing-score
04-29-2003, 07:46 PM
Ensure that you put session_start() at the top of every page.

mordred
04-29-2003, 08:35 PM
It all depends a little on how you retrived the username on the following pages - i.e. show us code!