<?php
$user = $_POST['user'];
$sifre = $_POST['sifre'];
if ((!$user == "") and (!$sifre == ""))
{
include ("ayar.php");
$sql = "select * from yonetici where user='$user' and sifre='$sifre' ";
$kontrol = mysql_query($sql);
$kayitsayisi = mysql_num_rows($kontrol);
if ($kayitsayisi == "0")
{
header("Location: giris.php?hata=yes");
} else
{
$kontrol_ok = mysql_result($kontrol,0,"user");
setcookie("kullanici", $kontrol_ok[user], time()+3600); //3600=1 saat
header("Location: yonetici.php");
}
} else
{
header("Location: giris.php?hata=yes");
}
?>ama güvenli degil