| Current Path : /var/www/html/kpsingh/kpsingh/ |
| Current File : /var/www/html/kpsingh/kpsingh/check-login.php |
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$msg = "";
if($username == "KPSingh" and $password == "qwerty123"){
session_start();
$_SESSION["name"] = $username;
$_SESSION["pass"] = $password;
header("location:update.php");
}
else if($username = '' or $password == ''){
$msg = "Please enter username and password!";
header("location:login.php?msg=$msg");
}
else{
$msg = "wrong username or password!";
header("location:login.php?msg=$msg");
}
?>