m0v0nage Posted February 9, 2010 Share Posted February 9, 2010 How do I name a session and then give it variables? Let's say I want a session named foo and want to give it a variable called "MyName" that is equal to "Matt". Then let it be accessed on any page with a session_start(); How do I do this? Link to comment https://forums.phpfreaks.com/topic/191438-how-do-i-name-a-session-and-then-use-it/ Share on other sites More sharing options...
teamatomic Posted February 9, 2010 Share Posted February 9, 2010 page1.php session_name('foo); session_start(); $_SESSION['MyName']='Matt'; page2.php session_name('foo); session_start(); $name = $_SESSION['MyName'] HTH Teamatomic Link to comment https://forums.phpfreaks.com/topic/191438-how-do-i-name-a-session-and-then-use-it/#findComment-1009212 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.