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, 2127🔥, 0💬
Popular Posts:
How to include additional claims in Azure AD v2.0 id_tokens? If you want to include additional claim...
Can You Specify the "new line" Character in Single-Quoted Strings? You can not specify the "new line...
How to build a PHP script to dump Azure AD 2.0 Authentication Response? If you are use the Azure-AD-...
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
How To Change Text Fonts for Some Parts of a Paragraph? If you want to change text fonts or colors f...