if ($_POST['kadi']=="" || $_POST['parola']==""){
header ("Location:giris.php?sonuc=hata");
}

include ('../inc/db.php');

$kull=$db->get_var("SELECT kullaniciadi FROM ys_ayarlar WHERE ayarid = '1'");
$sif=$db->get_var("SELECT sifre FROM ys_ayarlar WHERE ayarid = '1'");


if ($_POST['kadi']==$kull AND $_POST['parola']==$sif)
{
$yonet=$_POST['kadi'];
//Oturum aç ve kaydet
session_start();
$_SESSION['yonetici']=$yonet;

header("Location:index.php");
} else
{ header("Location:giris.php?sonuc=hata"); }
?>