ballhogjoni Posted January 10, 2008 Share Posted January 10, 2008 Is it necessary to have session_start(); at the beginning of every page that you want to pass a value to. ex. page 1 session_start(); $_SESSION['test'] = 'test'; page 2 session_start(); $test = $_SESSION['test']; echo $test; //output is the string test Quote Link to comment https://forums.phpfreaks.com/topic/85302-solved-session-question/ Share on other sites More sharing options...
jitesh Posted January 10, 2008 Share Posted January 10, 2008 Yes session_start() creates a session or resumes the current one based on the current session id that's being passed via a request, such as GET, POST, or a cookie. Quote Link to comment https://forums.phpfreaks.com/topic/85302-solved-session-question/#findComment-435240 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.