Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Set a Persistent Cookie
How To Set a Persistent Cookie? - PHP Script Tips - Understanding and Managing Cookies
✍: 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");
2007-04-25, 5077👍, 0💬
Popular Posts:
What Are Data Pump Export and Import Modes? - Oracle DBA FAQ - Loading and Exporting Data Data pump ...
How can we implement singleton pattern in .NET? Singleton pattern mainly focuses on having one and o...
Do You Know the Book "JUnit in Action"? You should know this book. It received some good reviews. Ti...
How To Set Up Breakpoints in Debug Mode? - Oracle DBA FAQ - Introduction to Oracle SQL Developer To ...
How does multi-threading take place on a computer with a single CPU? The operating system's task sch...