ah ok..now, how do I register a session variable so that I can test it or display in on a different page? and how do I unregister it if I don't want it to appear?
thanks for the reply. another question, is the session automatically ends when the browser is closed?
yah, but I have more questions to come..
how can I make a session exist after I close the window and when I open a new window and access my page the session is still there? or is it possible?
Nope, that is not possible.. what you want to do sounds like a perfect candidate for cookies..
Sessions are used to track visitor data during a single connection and across page changes within the same application..
Cookies are used to track visitor data during multiple connections within the same application.. Cookies can be utilized to maintain data when a user closes their browser and opens it again acessing your site again..
Sessions are stored on the server, while cookies are stored on the client..
I hope that helps...
Does the php page need to have the session_start() function at the top? I know that I a never put session_start() at the start of my pages anymore and the session variables still seem to function like they should. I think I started running into errors saying that 'headers already sent', so I stop putting the session_start() function at the top of the page and it got rid of the error. What is the session_start() function for? What does it do? is it bad that I leave it out?
Thanks. that does explain a lot. I knew that it must've been bad practice to leave it off. but I was a newbie when I started getting those headers already sent errors and that was the only thing that i could think of to fix it at the time. then i just got out of the habbit of it. Thanks again.
You should just post the whole script (if its not too big)...