Simple Cookie script in PHP
Simple cookie script in PHP. Set cookie and get cookie. This is a great way of storing user prefferences, settings and customizations on the site.
<?php// SET COOKIE
setcookie("cookieName1", "cookieValue", time()+60*60*24*30 );
// or do it this way
setcookie($cookieName2, $cookieValue, time()+60*60*24*30 );
// GET COOKIE
$cookie1 = $_COOKIE['cookieName1'];
$cookie2 = $_COOKIE['cookieName2'];
?>
If you liked this post, share it with your friends!
Posted on Wednesday, September 26th, 2007 at 10:19 pm / Programming
About The Author
valiikFounder/Writer/Web Designer/Janitor
Valik (Valiik) Rudd is an Internet entrepreneur. He develops new online businesses and creates new websites. His other passion is writing about the those things. Web Design Ideas blog is the outlet through which his ideas and web design tricks and tips get recorded and shared with others.