Hey all,
I am a compete n00b to programming not just PHP so please be gentle. :
I have a Wordpress website. It has a home page and a members page. I want to set a cookie when someone first goes to the members page so whenever they return to the site they will always go to the members page.
This is the code that I have come up with. I am pretty sure at least the syntax is incorrect at the least.
[php]<?php
if ( is_page( 8 ) || setcookie(“reg_user”, time()+606024*365);
if (!isset ($_COOKIE[‘reg_user’]))
header (“http://homepage.com: nocookie.php”);
else
header (“http://homepage/members-area: foundcookie.php”);
?>
[/php]
I am also not sure were to place the code in a wordpress blog my first thought would be the custom_function.php file is this correct?
Thanks so much for your help! ;D