Client Portal
Login below to access your account
$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"; } } } ?>
Login below to access your account