common Posted June 29, 2009 Share Posted June 29, 2009 Hi all! I want to create a login interface but i am not sure whats the right procedure. When the person login, for example with a username and password, its been checked by an if else statement,correct? But to where do i direct the the user? because if I only direct it to another page,its not really secure, because I can only put the other page name in the address bar...so how do I secure it?? Thanx Link to comment https://forums.phpfreaks.com/topic/164102-login-interface/ Share on other sites More sharing options...
MatthewJ Posted June 29, 2009 Share Posted June 29, 2009 Generally you would use sessions to store a variable once the user has logged in, then the page you're redirected to will have something like <?php if(!isset($_SESSION['validuser'])) { header("Location: loginpage.php"); } ?> Which will check for your session variable, if it isn't set, you know the person is not logged in yet, so you just send them back to the login page. Link to comment https://forums.phpfreaks.com/topic/164102-login-interface/#findComment-865676 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.