Session

Philippines
February 6, 2007 2:13pm CST
I have anyprobelm about session_start() and session_register(). Please help me. I want my login can use session.
1 person likes this
3 responses
• Spain
14 Feb 07
Remember that you cannot send anything to the client (i.e. with an echo()) before calling session_start(), as this function must change the HTTP headers. If you do so, you will get a 'Headers already sent' error. To propertly store values in the session, just use the superglobal array $_SESSION: $_SESSION ['username'] = 'lolailo'; $_SESSION ['city'] = 'London';
• India
1 Jun 07
u can start session using session_start(); then initialise $_SESSION{'username']; $_SESSION['login']
• Philippines
10 Feb 07
do you get an error when using that line of code, or there is wrong with the configuration of your server?
• Indonesia
7 Feb 07
what is web server that you use in your server? IIS? APACHE? or ..? please look at $session_save_path setting in your PHP.ini and be sure that the path is exist and permission is write able else you cant save your session