Cetanu Posted July 3, 2009 Share Posted July 3, 2009 Right now on my site I am using setcookie(loggedin), but I was told that I should use sessions because cookies can be exploited. I was wondering if that was true and, if so, how I would make a session that starts when someone logs in on the log-in form on the home page, and then carry that session over to every page. Thanks in advance, Cetanu Link to comment https://forums.phpfreaks.com/topic/164612-_session-help/ Share on other sites More sharing options...
adamlacombe Posted July 3, 2009 Share Posted July 3, 2009 Yes it is true and you would need to include: session_start(); in every page or you could just have it in the index file and do a "switch". Heres a good script that uses sessions: http://bhaviksblog.com/02/php-login-system-tutorial-part-3/ Link to comment https://forums.phpfreaks.com/topic/164612-_session-help/#findComment-868136 Share on other sites More sharing options...
Cetanu Posted July 3, 2009 Author Share Posted July 3, 2009 Okay thanks! That is an amazing tut with some awesome $_SESSION help! Link to comment https://forums.phpfreaks.com/topic/164612-_session-help/#findComment-868147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.