session_start(); ?>
include('includes/sdfgqoi0209fnf9f.php'); ?>
$Status = $_REQUEST['Status'];
if($_POST['Submit']=="Login"){
$Pwd = $_POST['Pwd'];
//$Email = $_POST['Email'];
$UserLogin = $_POST['UserLogin'];
$Error = "";
if (empty($Pwd)){
$Error .= "Pwd-";
}
if (empty($UserLogin)){
$Error .= "UserLogin-";
}
// if (empty($Email)){
// $Error .= "Email-";
// }
if(!empty($Error)){
$Status = "Incomplete";
}else{
// escape variables for security
// $Email = mysqli_real_escape_string($con, $_POST['Email']);
$email = mysqli_real_escape_string($con, $_POST['UserLogin']);
$password = mysqli_real_escape_string($con, $_POST['Pwd']);
$password = md5($password);
// $sql="select * from dbuserbox where email = '$Email' and dbpassword = '$Password' and status = '1'";
$sql="select * from users where email = '$email' and password = '$password'";
$result = mysqli_query($con,$sql);
$row = mysqli_fetch_array($result,MYSQLI_ASSOC);
//$active = $row['active'];
$userID = $row['email'];
$firstName = $row['firstName'];
$count = mysqli_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count == 1) {
// $_SESSION['Email'] = $Email;
$_SESSION['UserLogin'] = $email;
$_SESSION['UserName'] = $firstName;
header("location: dashboard.php");
// echo ($sql);
// echo "Success"; s
}else {
//echo ($sql);
//echo "error";
$error = "Your Login Name or Password is invalid";
$Status = "NoMatch";
}
}
}
?>
Client Portal
Login below to access your account
if ($Status == "Incomplete"){
echo ("
Your form is not complete
Please correct the highlighted fields
");
}else if($Status == "NoMatch"){
echo ("
The email/password you entered is not correct
Please recheck your info and try again
");
}else if($Status == "NoAccess"){
echo ("
You do not have access to this resource
Contact your system admin
");
}else if($Status == "LoggedOut"){
echo ("
You have been logged out
Thanks for stopping by!
");
}else if($Status == "PswRstBroken"){
echo ("
Your link is incorrect or expired
Please try to reset your password again.
");
}else if($Status == "PswRstSuccess"){
echo ("
Your password was successfully reset
Please login.
");
}else if($Status == "Goodbye"){
echo ("
You have been logged out
Thanks for stopping by!
");
}
?>