see http://www.php.net/manual/en/function.setcookie.php
There are a LOT of caveats about using cookies! I'd suggest something like:
<?
if ($remember_pw)
{
// expires in a year
$expires=mktime()+(246060*365);
$d=date("l, d-M-y H:i:s", ($expires));
$st="login=".urlencode(addslashes($login));
$st.="pass=".urlencode(addslashes($pass));
setcookie('logininfo', $st, $date);
}
?>
Then to access this login information
<?
$logininfo=$HTTP_COOKIE_VARS['logininfo'];
eval(stripslashes(urldecode($logininfo)));
?>
And variables $login and $pass should contain the values you want.
This might benefit from a bit o' fine tuning, but this should basically work.
-Ben