if(isset($_POST['btngiris'])){
$tcno = ($_POST["giris_tcno"]);
$sifre = ($_POST["giris_sifre"]);
if($tcno==""|| $sifre=="")
{
echo "<script>alert('Bos Alan Bırakmayınız.');</script>";
}
else
{
$sorgu = $DBbaglanti->prepare("SELECT * FROM kullanici WHERE tcNo = :tcno and sifre = :sifre");
$sorgu->bindParam(':tcno', $tcno, PDO::PARAM_STR);
$sorgu->bindParam(':sifre', $sifre, PDO::PARAM_STR);
$sorgu->execute(); //Sorguyu çalıştır.
if($sorgu->rowCount() > 0){ //rowCount() ile etkilenen satır sayısını bulduk.
/*echo "Giriş Başarılı";*/
session_start();
$_SESSION['login'] = true;
$_SESSION['tcno'] = $tcno;
header("Refresh: 1; url=rezervasyon.php");
}
else{
echo "<script>alert('Giriş Başarısız.');</script>";
}
}
Hiç yorum yok:
Yorum Gönder