Username or Password field left blank>'; } else { // does password and username match? if(($username == $correct_username) AND ($password == $correct_password)) { // this is where we escape and show content ?> Congrats you have logged in correctly! Username or Password invalid"; } } } else { $error = 'Please login'; } // error should contain something, so show the login form if($error) { echo($error); ?>
Username:
Password: