Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

good resource explaining how to set expiry times for php

Posted on 2006-11-14
2
Medium Priority
?
233 Views
Last Modified: 2008-03-06
ive searched the major SE's and cant find a good site to explain how to set the expiry times for cookies or session in php?

im looking to destroy a cookie after 5 mins... but any examples ive found just do days...
0
Comment
Question by:ellandrd
2 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 2000 total points
ID: 17936816
See http://de3.php.net/setcookie
setcookie("TestCookie", $value, time()+5*60);

Testcookie wi expire after 5 minutes
For setting times of the php-session see
http://de3.php.net/manual/en/function.session-set-cookie-params.php
0
 
LVL 16

Author Comment

by:ellandrd
ID: 17936836
thank you!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question