PDA

View Full Version : What are Session variables ?


mustang_sally_85344510
03-29-2009, 07:16 AM
Was wondering is there any DETAILED info on this site to help a person understand "session variables". Also, on a form...do I need to make a "hidden" field to input a username into the database when the form is submitted? Any information about this topic would be much appreciated!

Ray Borduin
03-30-2009, 10:10 AM
There is lots of information throughout the web about sesison variables. WebAssist does not have a detailed tutorial dedicated to this subject.

Try a google search. I found quite a few including:
http://www.devshed.com/c/a/PHP/Introduction-to-Maintaining-the-State-of-Applications-with-PHP-Sessions/
and
http://forums.devshed.com/php-development-5/php-session-explained-105657.html
and
http://www.webmasterworld.com/forum88/733.htm

mustang_sally_85344510
03-31-2009, 02:50 PM
Thank you!

DjMikeWatt
04-29-2009, 10:36 PM
I use a session variable to store the username when a person logs into the site... what I'm not sure how to do is automatically set that session variable from a cookie (as in, "keep me signed in" check box at the log-in screen that would set a cookie to auto set the session variable each time a page on the site is opened...

Is there any info on how to use the Cookie Toolkit for this purpose?

I should mention that I've tried the following:

Set a cookie called "auto_log" based on the checkbox state... if checked onSubmit, the cookie "auto_log" is set to the value of the username (which is also the value used in the session variable).
There is a server-side behavior to set the session variable "MM_Username" to the value of cookie "auto_log" before page load.

I thought this might work, but it does not.

Ray Borduin
04-30-2009, 08:46 AM
You should use the SecurityAssist product from webassist. It will create the login page with the auto login feature as well as create a forgot password functionality and the registration page and update profile page all from within one wizard.