";
echo "Admin
Log out.";
exit;
}
// check input variables against database
include('includes/dbTables.inc');
$conn = dbConnection();
if (!$conn) {
die("Are you sure your database is setup correctly? I'm giving up!". mysqli_connect_error());
}
$sql = "SELECT Admin_email, Admin_pwd FROM `VNSB_settings`";
$result = mysqli_query($conn, $sql);
// in case of an error, throw up an error message and exit
if (!$result) {
echo "Sorry, there is a problem with accessing your database!!!";
exit;
} else {
$record = mysqli_fetch_assoc($result);
if ($email==$record['Admin_email'] AND md5($pass)==$record['Admin_pwd']) {
$_SESSION['VNSB']=$record['Admin_email'];
mysqli_close($conn);
header ("Location: admin.php");
} else {
echo "Invalid login
Admin login
";
mysqli_close($conn);
exit;
}
}
}
?>
Welcome, Admin!
If you feel that the work I've done has value to you, I would greatly appreciate a paypal donation (click button below). I have spent many hours working on this project, and I will continue its development as I find the time. Again, I am very grateful for any and all contributions.
Admin login