skycruiser Posted February 28, 2007 Share Posted February 28, 2007 I'm trying to figure out a really simple way to do usernam/logins for my database. I've gone through a few tutorials but haven't gotten it to work properly and basically I haven't been satisifed with the detail given in the tutorials (read: I don't really undertand what I'm being told to do). So can anyone point me to a clear simple guide to setting this up? I'm not concerned with registration or any of that since I'll setup all usernames and passwords myself. Just want every page to check if someone is logged in and if not prompt a login. I've only been using php/mysql for a month or so. I am using sessions to pass a few variables around right now so at least I have used session variables a little. Thanks. michael Link to comment https://forums.phpfreaks.com/topic/40611-loginpassword-guide/ Share on other sites More sharing options...
jwk811 Posted February 28, 2007 Share Posted February 28, 2007 to check if someone's logged in you can get there id or username from the database when they login and put it into a session variable.. then on every page check to see if a session variable is active and if its not go to the login page Link to comment https://forums.phpfreaks.com/topic/40611-loginpassword-guide/#findComment-196416 Share on other sites More sharing options...
skycruiser Posted March 1, 2007 Author Share Posted March 1, 2007 I think I may have figured where I was hung up. The exit function stops the page from loading further. That was my main problem, how to hide the page content if the login is bad. I have other problems but at least I can make a little progress knowing that. Thanks. michael Link to comment https://forums.phpfreaks.com/topic/40611-loginpassword-guide/#findComment-196547 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.