Code: Select all
<?php
$username = $_POSTї'username'];
$password = $_POSTї'password'];
$connection = @mysql_connect(****,****,****);
$db = @mysql_select_db(*****, $connection);
$sql = "SELECT * FROM members WHERE username = '$username'";
$result = mysql_query ($sql);
$row = mysql_fetch_array($result);
$usercheck = $rowї"username"];
$passcheck = $rowї"password"];
if ($passcheck == $password and $usercheck == $username and $username != ""):
$_SESSIONї'authenticated'] = "yes";
$_SESSIONї'error'] = "no";Code: Select all
"header("Location: http://".$_SERVERї'HTTP_HOST'].dirname($_SERVERї'PHP_SELF'])."/". $_SESSIONї"sourcepage"]); "
else:
echo ("You do not have authorization to enter. Please contact admin to register.");
endif;
?>Thanks,
concatenate_man