arif_shariati Posted January 10, 2011 Share Posted January 10, 2011 I want to work with sessions in my web application using simple php to lessen the connectivity with the database. I am confused where to start session. I mean from which page to start my session? Like wise facebook when we get logged in, after that we can see our profile etc all. My idea about this is "Once we get logged in all theĀ necessary data is pulled out from the database and put in session variables. and when we log out, sessions variables are unset". Please let me know, am i right ? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 10, 2011 Share Posted January 10, 2011 I may be misunderstanding what you're actually asking, but you need to use session_start() before anything at all is output, at the head of any script that will utilize session data. Quote Link to comment Share on other sites More sharing options...
arif_shariati Posted January 10, 2011 Author Share Posted January 10, 2011 Yes.But does facebook do the same ? Quote Link to comment Share on other sites More sharing options...
Pikachu2000 Posted January 10, 2011 Share Posted January 10, 2011 I have no idea how Facebook coded their site. Quote Link to comment 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.