thanks dalescop..
hmm..i have done something like this;
my javascript code
<script language= "javascript">
function checkBox (form){
if{form.checkbox.value=="on"){
<?
setcookie("username",$_GET['username'], strtotime('+6 months'));
setcookie("password",$_GET['password'], strtotime('+6 months'));
?>
<!-->proceed to the checklogin.php<-->
else{
<!-->proceed to the checklogin.php without set the cookie<-->
}
}
</script>
and my form
table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="checklogin.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Member Login </strong></td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input name="mypassword" type="password" id="mypassword"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td>
<input type="checkbox" name="checkbox" value="on" onclick="checkBox">Remember my username and password</td>
<tr>
<td><input type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
i guess i have missed lots of thing in my code..
but i really not so sure, wat else shuld i add...
hope anyone can help...
thanks