if (isset($_POST['giris'])) { $username=$_POST['username']; $password=md5($_POST['password']); $kullanicisor=$db->prepare("SELECT * FROM user where username=:username and password=:password"); $kullanicisor->execute(array( 'username' => $username, 'password' => $password )); $say=$kullanicisor->rowCount(); if ($say==1) { $_SESSION['username']=$username; header("Location:dosya.php"); exit; } else { header("Location:dosya.php"); exit; } }
Umarım işine yarar