Unable to set cookie
Posted: Fri Feb 10, 2006 5:40 pm
Hey,
Sorry about this question but for some reason i think i need someone outside of the box to fill me in on this
i am trying to set a cookie using
and cont the index page i check to see if this cookie was set using
but i get "could not set cookie" statement
I only have the above script setting the cookie so there are no output statements or blank lines
theres no pre-script process
im using an administrative profile on a windows XP
im using mozilla but it also doesnt work in IE
my register globals are on for a PHP 4.3.4
am i missing the point here?
Sorry about this question but for some reason i think i need someone outside of the box to fill me in on this
i am trying to set a cookie using
Code: Select all
<?php
$cookie = setcookie('ratings','set the cookie',time()+60*60*24*30,$PHP_SELF,$_SERVER['HTTP_HOST']);
header("Location: administration/index.php");
exit;
?>Code: Select all
if($_COOKIE['ratings'] || $HTTP_COOKIE_VARS['ratings'] || $_REQUEST['ratings'])
print "cookie set";
else print "Could not set cookie";
echo $ratings;I only have the above script setting the cookie so there are no output statements or blank lines
theres no pre-script process
im using an administrative profile on a windows XP
im using mozilla but it also doesnt work in IE
my register globals are on for a PHP 4.3.4
am i missing the point here?