jimfog Posted October 17, 2012 Share Posted October 17, 2012 I have set up a persistent login mechanism which works Ok-till now. The problem appears when the user attempts to go the member section directly(by typing the URL in the web address field), by bypassing the home page. In that case session will not work, I get the usual undefined index message-meaning no value was passed to the session array. As it is done in the home page of the the site. This leads me to the following conclusion-and tell me if I am right: I need to check in every page that a cookie exists in the user's PC and if positive assign a value to the session array. Now the only thing I am doing is just calling session_start at every page except the home page where the code is more, setcookie, redirection etc. Link to comment Share on other sites More sharing options...
Ingolme Posted October 17, 2012 Share Posted October 17, 2012 Normally, I have the same global system running on every single page of my website, while each page has its own additional code. You should include a file with the code that checks the cookie on all the pages of your site. Link to comment Share on other sites More sharing options...
jimfog Posted October 18, 2012 Author Share Posted October 18, 2012 the problem seems to appear only if the user has logout first-at which point the session is destroyed.I have know pinpoint the problem more accurately. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now