Page 1 of 1

Cookie Help

Posted: Thu Aug 23, 2007 2:04 pm
by lawksalih
Hi,

I have a php page which displays a flash introduction before the visitor reaches the actual index page of the website. I want to give the user the ability to disable the intro page next he/she visits the site. Could this be done via cookie settings? If so, how.

Your help is appreciated.

Posted: Thu Aug 23, 2007 3:21 pm
by superdezign
setcookie() and then use the $_COOKIE superglobal array to check.

Posted: Fri Aug 24, 2007 9:15 am
by lawksalih
So if I set a cookie on their machine, how can I then return them to a URL. Btw, don't mind the expiration:

Code: Select all

<?php
$value = 'FlashPage';

setcookie("mycookie", $value);
setcookie("mycookie", $value, time()+3600);  
?>
Thanks.

Posted: Fri Aug 24, 2007 9:20 am
by VladSun
Use $_COOKIE to read'em and decide what to do :)

Posted: Fri Aug 24, 2007 9:56 am
by lawksalih
Got it. Thanks for your help.