acidglitter Posted March 11, 2008 Share Posted March 11, 2008 I have a folder where a php session is started. If I went to a file outside of that folder, how could I keep that same session? Link to comment https://forums.phpfreaks.com/topic/95707-php-sessions/ Share on other sites More sharing options...
ILYAS415 Posted March 11, 2008 Share Posted March 11, 2008 Hmmm lets say you registered the session as... $_SESSION['username'] All you need to do is on another php file use the following code... session_start(); $username= $_SESSION['username']; of course you would need security eg. to check if they are logged in. Link to comment https://forums.phpfreaks.com/topic/95707-php-sessions/#findComment-490024 Share on other sites More sharing options...
acidglitter Posted March 11, 2008 Author Share Posted March 11, 2008 I did that, but it doesn't want to work, and I heard that it might be because the php file is outside of the folder the session was created in.. Link to comment https://forums.phpfreaks.com/topic/95707-php-sessions/#findComment-490038 Share on other sites More sharing options...
acidglitter Posted March 26, 2008 Author Share Posted March 26, 2008 Never mind, we pretty much got it to work Link to comment https://forums.phpfreaks.com/topic/95707-php-sessions/#findComment-501676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.