I have a login script to authenticates with email address and password.
I want this script to also check the date stored in the users profile against current date. if the date are same, it redirects to an error page.
Bellow are my authentication script.
Please help
I want this script to also check the date stored in the users profile against current date. if the date are same, it redirects to an error page.
Bellow are my authentication script.
Code:
<?php
include "dbCon.php";
$EmailAd = $_POST['EmailAd'];
$Password = $_POST['Password'];
$query = mysql_query("SELECT * from user where EmailAd = '$EmailAd'
AND Password = '$Password'");
$row = mysql_fetch_array($query);
if ($row) {
session_start();
$_SESSION['EmailAd'] = $_POST['EmailAd'];
header ('Location: home.php');
exit();
}
else {
header ('Location: loginFailed.php');
exit();
}
?>
Comment