i create some login form and i put remember me check box below username and password field
this is my login form code :
<?php error_reporting(0); include "../db.php"; ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii" />
<title>IN ADMIN PANEL | Powered by Mahdi Yazdani</title>
<link rel="shortcut icon" href="images/loginpage.ico" mce_href="images/loginpage.ico" />
<!-- Copyright C 2012-Feb Mahdi Yazdani 2010-2012 -->
<link type="text/css" href="./style.css" rel="stylesheet" />
<link type="text/css" href="./css/login.css" rel="stylesheet" />
<script type='text/javascript' src='./js/jquery-1.4.2.min.js'></script> <!-- jquery library -->
<script type='text/javascript' src='./js/iphone-style-checkboxes.js'></script> <!-- iphone like checkboxes -->
<script type='text/javascript'>
jQuery(document).ready(function() {
jQuery('.iphone').iphoneStyle();
});
</script>
<!--[if IE 8]>
<script type='text/javascript' src='http://hello.amnesio.com/js/excanvas.js'></script>
<link rel="stylesheet" href="http://hello.amnesio.com/css/loginIEfix.css" type="text/css" media="screen" />
<![endif]-->
<!--[if IE 7]>
<script type='text/javascript' src='http://hello.amnesio.com/js/excanvas.js'></script>
<link rel="stylesheet" href="http://hello.amnesio.com/css/loginIEfix.css" type="text/css" media="screen" />
<![endif]-->
<meta charset="UTF-8"></head>
<body>
<div id="background">
<div id="container">
<div id="logo">
<img src="./assets/logologin.png" alt="Logo" />
<br>
<span style="font-size:13px; color:#FFF; font-style:italic;"><?php
$error=@$_REQUEST['e']; if($error=="error")
{ echo "<img src=\"images/error.png\" border=\"0\" />";
echo "<b>"." Invalid username or password."."</b>"; } ?></span>
</div>
<div id="box">
<form action="main.php" method="POST">
<div class="one_half">
<p><input name="username" value="username" class="field" onblur="if (jQuery(this).val() == "") { jQuery(this).val("username"); }" onclick="jQuery(this).val("");" test autocomplete="off" /></p>
<p><input type="checkbox" class="iphone" /><label class="fix">Remember me</label></p>
</div>
<div class="one_half last">
<p><input type="password" name="password" test autocomplete="off" value="asdf1234" class="field" onblur="if (jQuery(this).val() == "") { jQuery(this).val("asdf1234"); }" onclick="jQuery(this).val("");" /> </p>
<p><input type="submit" value="Login" class="login" /></p>
</div>
</form>
</div>
</div>
</div>
<!-- Copyright C 2012-Feb Mahdi Yazdani 2010-2012 -->
</body>
</html>
and then with using php i can truly login and so on but the problem is here i want to use remember me check box i heard some things about using cookie but actually i dont know about that please help me with this problem !
here it is my login page :
`
<?php
ob_start();
session_start();
error_reporting(0);
include "../db.php";
$username=$_POST['username'];
$password=md5($_POST['password']);
$sql=mysql_query("select * from admin where user='$username' and pass='$password' "); $c=mysql_num_rows($sql);
if($c==1)
{
$_SESSION['user']=$username;
header("location:popular/learn/");}
else{ header("location:index.php?e=error"); }
ob_end_flush();
?>
`