Session
By desperated
@desperated (15)
Philippines
3 responses
@timpmail (4)
• 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';
@joban_john (11)
• India
1 Jun 07
u can start session using
session_start();
then initialise
$_SESSION{'username'];
$_SESSION['login']
@quicksilver3739 (37)
• 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?
@spectrasonic (54)
• 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