PHP Example
Screen shot
Remember Me Script for User Login

<?php
ob_start();
if(isset($_POST[\'btnsubmit\']))
{
if(isset($_POST[\'check1\']))
{
$userid=$_POST[\'userid\'];
$password=$_POST[\'password\'];
$expire=time()+60*60*24*7;
setcookie(\'userid\',$userid,$expire);
setcookie(\'password\',$password,$expire);
}
}
?>
<html>
<head>
<title>Remember Me PHP Script</title>
</head>
<body>
<form name=\"frm\" method=\"post\" action=\"\">
<table width=\"23%\" height=\"118\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">
<tr>
<td width=\"33%\" height=\"38\">User ID </td>
<td width=\"67%\">
<input name=\"userid\" type=\"text\" id=\"userid\"
value=\"<?php if(isset($_COOKIE[\'userid\'])) echo $_COOKIE[\'userid\']; ?>\" />
</td>
</tr>
<tr>
<td height=\"22\">Password</td>
<td><input name=\"password\" type=\"password\" id=\"password\"
value=\"<?php if(isset($_COOKIE[\'password\'])) echo $_COOKIE[\'password\']; ?>\" /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td><input name=\"check1\" type=\"checkbox\" id=\"check1\" value=\"rem\" />
Remember me for 7 days. </td>
</tr>
<tr>
<td>&nbsp;</td>
<td>
<input name=\"btnsubmit\" type=\"submit\" id=\"btnsubmit\" value=\"Submit\" />
</td>
</tr>
</table>
</form>
</body>
</html>

You can download source code here