Tools, FAQ, Tutorials:
Setting a Persistent Cookie in PHP
How To Set a Persistent Cookie in PHP?
✍: FYIcenter.com
If you want to set a persistent cookie, you can use the setcookie() function with an extra parameter to specify its expiration time. To follow sample script sets 2 persistent cookies to be expired within 7 days:
setcookie("LoginName","FYICenter"); setcookie("PreferredColor","Blue"); setcookie("CouponNumber","07470433",time()+60*60*24*7); setcookie("CouponValue","100.00",time()+60*60*24*7); print("2 temporary cookies were delivered.\n"); print("2 consistent cookies were delivered.\n");
Â
⇒Understanding and Managing Cookies in PHP
⇒⇒PHP Tutorials
2016-11-04, 1367👍, 0💬
Popular Posts:
How to use the urllib.request.Request object to build more complex HTTP request? The urllib.request....
How to View Atom Feeds with IE (Internet Explorer)? If you want to view Atom Feeds with IE (Internet...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to use the "send-one-way-request" Policy statement to call an extra web service for an Azure API...
How to create Hello-3.1.epub with WinRAR? I have all required files to create Hello-3.1.epub. To cre...