Is this the right way to set a cookie?
- by AAA
// if login is ok then we add a cookie
$_POST['user_name'] = stripslashes($_POST['user_name']);
$hour = time() + 3600;
setcookie(ID_my_site, $_POST['user_name'], $hour);
setcookie(Key_my_site, $_POST['password'], $hour);
Is this a right way to set cookies? Its been causing me serious redirect errors. See here: PHP Redirect problem with subdomain