azisnomarsa Posted June 27, 2007 Share Posted June 27, 2007 <?php session_start(); if ($_POST['vards'] == 'janis' && $_POST['PWND'] == 'parole' ) { $_SESSION['auth'] = true; header("Location: index.php"); } else{ $_SESSION['auth'] = false; header("Location: login.php"); } ?> Well I made very simple login script. IMO if username and password is enterd right, I should be able to access the index.php, but if wrong I should be thrown back at login page. Problem is that even if I enter correct username and pwd I still get redirected back to the login page but not to index. It really beats me out. Link to comment https://forums.phpfreaks.com/topic/57434-solved-login-with-session/ Share on other sites More sharing options...
pocobueno1388 Posted June 27, 2007 Share Posted June 27, 2007 Can you post the code to the form? Link to comment https://forums.phpfreaks.com/topic/57434-solved-login-with-session/#findComment-284165 Share on other sites More sharing options...
azisnomarsa Posted June 27, 2007 Author Share Posted June 27, 2007 No need I fixed it problem was in my html. Sometimes I feel so stupid Link to comment https://forums.phpfreaks.com/topic/57434-solved-login-with-session/#findComment-284167 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.