Page 1 of 1

Isset and sessions

Posted: Sun Aug 01, 2010 5:37 pm
by Baseball435
Hey guys, I still don't fully understand isset and sessions. I've looked at websites explaining them but they weren't helping me. So can anyone explain them both maybe with a example? Thanks guys!

~baseball435

Re: Isset and sessions

Posted: Sun Aug 01, 2010 6:14 pm
by Jackolantern
Session variables are variables that are stored on the web server. They help you keep "state" between pages, because typically on a web site, the state of your application is lost between page requests.

Isset() is a function to see if a variable has been set to a value. It returns True if it has been set, or False if it has not been set. It is often used to test Session variables to see if they have been set on another page, because otherwise you would just have to use the session variable you are thinking about and see if you get an error, which is obviously not a good design choice.

Re: Isset and sessions

Posted: Sun Aug 01, 2010 8:22 pm
by Baseball435
Oohh okay thanks!