<?php
require('ayar.php');
ob_start();
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]> <html lang="en" class="ie6 ielt8"> <![endif]-->
<!--[if IE 7 ]> <html lang="en" class="ie7 ielt8"> <![endif]-->
<!--[if IE 8 ]> <html lang="en" class="ie8"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Kullanici Girisi</title>
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<?php
if($_POST)
{
$kullanici = guvenlik($_POST['kullanici']);
$sifre = guvenlik($_POST['sifre']);
$tarih = date("d-m-Y");
$ara = mysql_query("SELECT * FROM kullanici2 WHERE sifre='$sifre'");
if(mysql_num_rows($ara) > 0){
$cek = mysql_fetch_array($ara);
$id=$cek['id'];
header('Refresh:2; url='.$cek['url']);
mysql_query("UPDATE kullanici2 SET songiris='$tarih' WHERE id='$id'");
}else{
echo header('Refresh:2;url=index.php');
echo"<div class='ortala1'><h1>Hatalı şifre ya da kullanıcı adı!</h1></div>";
}
}
else{
?>
<div class="ortala"><h1>Bu Bölüme Erişmek İcin Firmamız'dan Aldıgınız Kullanıcı Adı Ve Șifreyle Online Mağaza'mıza Giriş Yapabilirsiniz.</h1></div>
<div class="container">
<section id="content">
<form action="" method="post">
<h1>Giris Formu</h1>
<div>
<input type="password" placeholder="Sifre" required="" id="password" name="sifre"/>
</div>
<div>
<input type="submit" value="Giris Yap" />
</div>
</form><!-- form -->
<!-- button -->
</section><!-- content -->
</div><!-- container -->
<?php } ?>
</body>
</html>
Hocam eyvallah allah razı olsun.