Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

How to show the default cookie set page if you are not allowed to visit a page


setcookie("testcookie", "testvalue");
if(!isset( $_COOKIE['testcookie'] ) && $_SERVER['SCRIPT_NAME'] != '/enable-cookies.php' && $_SERVER['SCRIPT_NAME'] != '/index.php'  && $_SERVER['SCRIPT_NAME'] != '/contact_us.php') tep_redirect(tep_href_link('enable-cookies.php'));
Advertisements

Comments are closed.

%d bloggers like this: