Solved

good resource explaining how to set expiry times for php

Posted on 2006-11-14
2
224 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 48

Accepted Solution

by:
hernst42 earned 500 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Author Note: Since this E-E article was originally written, years ago, formal testing has come into common use in the world of PHP.  PHPUnit (http://en.wikipedia.org/wiki/PHPUnit) and similar technologies have enjoyed wide adoption, making it possib…
This article discusses four methods for overlaying images in a container on a web page
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

695 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