limitphp Posted October 28, 2008 Share Posted October 28, 2008 My index page will have content for both people that are already logged in and for people who are not logged in. My index page will have a place to login. I'll be using sessions (for short term vistors) and cookies (for long-term visitors) for logging in. If they check the "Remember Me" box, I'll place a cookie with a tempID that ties to their userID in a temporary table entry. If they don't check it, I'll use sessions. Here's where I'm starting to get confused. At the beginning of the index page, should I be checking to see if sessions or cookies exist? Technically, only one should exist, right? They will either be logging in at a public computer (possibly not checking remember me) or they will be logging in at home (checking remember me) Wamp server phpadmin 5.2.6 Link to comment https://forums.phpfreaks.com/topic/130446-help-with-building-index-page-logically/ Share on other sites More sharing options...
limitphp Posted October 28, 2008 Author Share Posted October 28, 2008 Actually, I just realized, I need to store more in the cookie besides a uniqueID, otherwise, all someone would have to do is keep hitting my site with a uniqueID in a cookie, until they get lucky and take over a user. So, if they check "Remember Me" I'll store a uniqueID and a md5(password + some value). Then store both of those in the cookie and a table that ties it to their userID. Does that sound like it would be somewhat secure? Link to comment https://forums.phpfreaks.com/topic/130446-help-with-building-index-page-logically/#findComment-676777 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.