Set a Cookie
1 2 3 4 5 6 7 8 9 10 11 12 |
<?php $value = "my cookie value"; // send a cookie that expires in 5 seconds setcookie("TestCookie",$value, time()+5); // or 24hrs //setcookie("TestCookie",$value, time()+3600*24); echo $_COOKIE["TestCookie"]; ?> |