Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

good resource explaining how to set expiry times for php

Posted on 2006-11-14
2
Medium Priority
?
229 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 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

670 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