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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: