Aren't you sassy.
1. Yes you can.
Make your link like so: page.php?flash=2
On your cookie script: if( $_GET['flash'] == 2 ) setcookie("clankiller", "1", time()-60*60*24*30, "/");
You will see this in the code below. BTW, it is also a good idea to specify all 6 parameters for setcookie(), as some browsers won't accept the cookie otherwise.
2. See the code below and ask questions if it still doesn't make sense.
3. That's right. You'll take it and like it!
4. Cool. I'll assume you updated flash=2 instead of 0.
| | |
| Code: //cookie.txt if( $_GET['flash'] == 1 ) { setcookie("clankiller_flash", 1, time() +60*60*24*365, "/", ".clankiller.com", 0); header("Location:" . $_SERVER['PHP_SELF']); } elseif( $_GET['flash'] == 2 ) { setcookie("clankiller_flash", 1, time() -60*60*24, "/", ".clankiller.com", 0); header("Location:" . $_SERVER['PHP_SELF']); }
//where you want your menu if( $_COOKIE['clankiller_flash'] == 1 ) include("flashmenu.txt"); else include("non_flashmenu.txt");
| |
| | |