BobInVa Posted June 6, 2016 Share Posted June 6, 2016 Hello, Perhaps someone can help with this. I've set up the login and logout system and everything works perfectly, all the Paypal sandbox stuff, everything. The logout works with the logout link. My problem is it also logs me out when I click Home or Knowledge is Power. I'm not sure why, maybe the session is being destroyed but I don't see where. My site is hosted on GoDaddy. Link to comment Share on other sites More sharing options...
Larry Posted June 6, 2016 Share Posted June 6, 2016 I would start by checking the session ID to see if it changes. You should be able to do echo session_id(); Also make sure you're not changing domain names or subdomains (e.g., from www.example.com to example.com). Link to comment Share on other sites More sharing options...
BobInVa Posted June 7, 2016 Author Share Posted June 7, 2016 Thanks Larry. I fixed it. The problem was in index.php. Under require('./includes/config.inc.php'); I had $_SESSION=array(); so I was clearing out the session data. I commented it out and now working perfectly. Link to comment Share on other sites More sharing options...
Larry Posted June 9, 2016 Share Posted June 9, 2016 Ah! That would do it. Kudos for figuring it out and thanks for posting the solution! Link to comment Share on other sites More sharing options...
Recommended Posts