Hi,
I'm creating a remember me feature for my site which obviously sets a cookie and when the visitors loads the site again,he would already be logged in.
This is a part of the code which is related :
$login_email = request_var('login_email', '');
$login_password = request_var('login_password', '');
$login_remember = (isset($_POST['remember']) && $_POST['remember'] == 1) ? true: false;
setcookie('login_email', $_POST['login_email'], time()+60*60*24*365, '/','localhost',false);
setcookie('login_password', md5($_POST['login_password']), time()+60*60*24*365, '/','localhost',false);
HTML:
<strong class="normal"><input type="checkbox" name="remember" value="1">Remember</strong>