Beispiel #1
0
 function validate_user($un, $pwd)
 {
     $mysql = new Mysql();
     $ensure_credentials = $mysql->verify_Username_and_Pass($un, md5($pwd));
     if ($ensure_credentials) {
         $_SESSION['status'] = 'authorized';
         header("location: index2.php");
     } else {
         return "Benutzername und Passwort nicht korrekt!";
     }
 }
Beispiel #2
0
 function validate_user($un, $pwd)
 {
     $mysql = new Mysql();
     $ensure_credentials = $mysql->verify_Username_and_Pass($un, md5($pwd));
     if ($ensure_credentials) {
         $_SESSION['status'] = 'authorized';
         header('location: index.php');
     } else {
         return "Please enter a correct username and password";
     }
 }
Beispiel #3
0
 function validate_user($un, $pwd)
 {
     $Mysql = new Mysql();
     if (empty($un) || empty($pwd)) {
         return "Please fill in all fields.";
     }
     $ensure_credentials = $Mysql->verify_Username_and_Pass($un, $pwd);
     if ($ensure_credentials) {
         header("location: index.php");
     } else {
         return "Please enter a correct username and password. ";
     }
 }