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, ∼2653🔥, 0💬
Popular Posts:
How To Move Uploaded Files To Permanent Directory in PHP? PHP stores uploaded files in a temporary d...
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
Where to get the detailed description of the JSON.stringify() Function in JavaScript? Here is the de...
How to add request body examples to my Azure API operation to make it more user friendly? If you hav...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...