I have the following code:
Code: Select all
<?php
if (validate($user))
{
setcookie("officer", $user,$cook_life,"/csoff/","",0);
header("location: http://www.google.com");
}
else
{
print "Authentication failed.";
}
?>Code: Select all
<?php
setcookie("officer", $user,$cook_life,"/csoff/","",0);
?>Code: Select all
<?php
if (!setcookie("officer", $user,$cook_life,"/csoff/","",0))
{
print "Failed";
}
else
{
print "Succesfull.";
}
?>Are there any other things that may be preventing the cookie from being set that I am overlooking?
Thanks for any and all help provided.