I am quite new, and I hope someone can assist me, as I am a little confused.
I am attempting to write a quick little script that does the following:
When index.php is opened, it automatically redirects to index.html (until the user selects Home). Also, I want it to store a single-session cookie (ie: until the browser window closes) so that anytime a visitor selects the home button during the visit, it goes to index.php.
I have searched the net and the best pieces of code I have found are
Code: Select all
setcookie('SplashCookie','1',time()+(60*60*24*365));
and
ob_start();
echo "Test";
header("Location: http://www.myurl.com/index.html");
ob_flush();If anyone can help, it would be appreciated.
Thanks!