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");
⇒ Testing Persistent Cookies in PHP
⇐ What Is a Persistent Cookie in PHP
2016-11-04, 2443🔥, 0💬
Popular Posts:
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
Tools, FAQ, Tutorials: JSON Validator JSON-XML Converter XML-JSON Converter JSON FAQ/Tutorials Pytho...
How to reinstall npm with a node version manager? I am getting permission errors with the current ve...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...