What is wrong with the following code? I have set allow all cookies on for
my browser. Why does this always redirect to NoCookies.htm?
Please see code below (both of the logic constructs below always redirect to
NoCookies.htm)
=============== =============== =============== =============== ===
setcookie ("thisisthename ","Cookie_test" ,time()+86400,"/");
if (!isset ($cookie)) {
//echo "We could not find the cookie, it may have expired?";
Header("locatio n: NoCookies.htm") ; ////// Redirect if all is
successful!!!
exit;
}
if (!isset($_cooki e['thisisthename']))
{
//echo "We could not find the cookie, it may have expired?";
Header("locatio n: NoCookies.htm") ; ////// Redirect if all is
successful!!!
exit;
}
my browser. Why does this always redirect to NoCookies.htm?
Please see code below (both of the logic constructs below always redirect to
NoCookies.htm)
=============== =============== =============== =============== ===
setcookie ("thisisthename ","Cookie_test" ,time()+86400,"/");
if (!isset ($cookie)) {
//echo "We could not find the cookie, it may have expired?";
Header("locatio n: NoCookies.htm") ; ////// Redirect if all is
successful!!!
exit;
}
if (!isset($_cooki e['thisisthename']))
{
//echo "We could not find the cookie, it may have expired?";
Header("locatio n: NoCookies.htm") ; ////// Redirect if all is
successful!!!
exit;
}
Comment