Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
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, 5229👍, 0💬
Popular Posts:
How Many Types of Tables Supported by Oracle? - Oracle DBA FAQ - Managing Oracle Database Tables Ora...
How To Run "mysql" Commands from a Batch File? - MySQL FAQs - Command-Line End User Interface mysql ...
How to measure functional software requirement specification (SRS) documents? Well, we need to defin...
How To Create an Add-to-Netvibes Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...