Cookie Kullanılmış Bir Login Ekranı Oluşturma
<!DOCTYPE html>
<html>
<head>
<title>Filitre</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
</style>
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
});
</script>
<?php
if ($_POST['kullanici_adi']) {
setcookie("kadi", $_POST['kullanici_adi'], time() + 3600);
}
$SaklananKullaniciAdi = $_COOKIE['kadi'];
?>
</head>
<body style="background-color: <?php echo $_POST['zemin_rengi'] ?> ">
<div id="divimiz">
<form name="login_form" method="post">
<div>Kullanıcı Adınız : <input type="text" name="kullanici_adi" placeholder="Kullanıcı Adınızı Girin" value="<?php echo $SaklananKullaniciAdi ?>" /></div>
<div>Şifreniz : <input type="text" name="sifre" placeholder="Şifrenizi Girin" /></div>
<input type="submit" value="Giriş" />
</form>
</div>
</body>
</html>
<html>
<head>
<title>Filitre</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style type="text/css">
</style>
<script src="//code.jquery.com/jquery-1.9.1.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
<script type="text/javascript">
$(document).ready(function() {
});
</script>
<?php
if ($_POST['kullanici_adi']) {
setcookie("kadi", $_POST['kullanici_adi'], time() + 3600);
}
$SaklananKullaniciAdi = $_COOKIE['kadi'];
?>
</head>
<body style="background-color: <?php echo $_POST['zemin_rengi'] ?> ">
<div id="divimiz">
<form name="login_form" method="post">
<div>Kullanıcı Adınız : <input type="text" name="kullanici_adi" placeholder="Kullanıcı Adınızı Girin" value="<?php echo $SaklananKullaniciAdi ?>" /></div>
<div>Şifreniz : <input type="text" name="sifre" placeholder="Şifrenizi Girin" /></div>
<input type="submit" value="Giriş" />
</form>
</div>
</body>
</html>
Yorumunuzu Ekleyin