Sanjoy Roy

[MCM, MCP, SCJP] – Senior PHP Programmer

Monthly Archives: September 2012

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'));