allex01 Posted February 20, 2008 Share Posted February 20, 2008 I have a site that uses sessions and in cookies it's stored as PHPSESSID The session includes the the user info such as username and password. I'm trying to build an autologin feature so that when a user logs in to one script he's automatically logged in to the other. I tried the following which obviously doesn't work $user = $_SESSION['PHPSESSID']; If i echo out $user nothing shows. How can retrieve the user info from PHPSESSID Link to comment https://forums.phpfreaks.com/topic/92013-retrieving-session-info/ Share on other sites More sharing options...
allex01 Posted February 20, 2008 Author Share Posted February 20, 2008 I tried print_r ($_SESSION); I can see the array for PHPSESSID [user] => Array ( [user_id] => 1 [user_name] => admin [password] => adminpass I want to retrieve the info for user_name and password. How do i get this info from sessions Link to comment https://forums.phpfreaks.com/topic/92013-retrieving-session-info/#findComment-471286 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.