problems with session in multiple screens
Posted: Mon Feb 03, 2003 12:41 pm
I am trying to implement session management into our site. I have a shopping cart that requires a unique session id (used as the index into the shopping cart) for each user.
In index.php i have
session_start();
//change session name to be used part of the cookie name/value
$session.session_name('quan@twoguysco.org');
i then take the session_name and the Session_ID and create a new record in the shopping cart table.
The problem is when i go to shoppingcart.php from index.php, i try to access session_id() but it would not let me. It returns blank.
I would like to associate the person visiting shopping cart with his/her session. How can i get the session id for the user so i can pull his record from the database.
thanks a million for your help.
--quan
In index.php i have
session_start();
//change session name to be used part of the cookie name/value
$session.session_name('quan@twoguysco.org');
i then take the session_name and the Session_ID and create a new record in the shopping cart table.
The problem is when i go to shoppingcart.php from index.php, i try to access session_id() but it would not let me. It returns blank.
I would like to associate the person visiting shopping cart with his/her session. How can i get the session id for the user so i can pull his record from the database.
thanks a million for your help.
--quan