rambocete123
Fırında Isıttığım İlk Taş
PHP:
if (isset($_POST['admingiris'])) {
$email=$_POST['email'];
$password=md5($_POST['password']);
$kullanicisor=$db->prepare("SELECT * FROM accounts where email=:mail and password=:password and kullanici_yetki=:yetki");
$kullanicisor->execute(array(
'mail' => $email,
'password' => $password,
'yetki' => 5
));
echo $say=$kullanicisor->rowCount();
if ($say==1) {
$_SESSION['email']=$email;
header("Location:/mcweb/admin/proxy/index.php");
exit;
} else {
header("Location:/mcweb/admin/proxy/login.php?durum=no");
exit;
}
}
/login.php yerini index.php olarak değiştirince giriş yapabiliyorum.
buda yetkisiz olduğuna dair resim.