cookie setting
Posted: Wed Apr 20, 2005 4:46 am
at the top of my script i have
then at the bottom of my script i have
but the cookie dosnt seam to get set until the script is completly finished so it takes it 2 runs for it to work. is there any way i can have the cookie set before the script reaches the end??
Code: Select all
if (isset ($_POST['remember'])){
setcookie ('name', $name, time()+60*60*24*30, '/', '', 0);
}Code: Select all
if (isset($_COOKIE['name'])){
$message = $message.'*,*:!.-'.$_COOKIE['name'].'*,*:!.-'.$ip.'*,*:!.-'.$num;
}else{
$message = $message.'*,*:!.-NULL*,*:!.-'.$ip.'*,*:!.-'.$num;
}