Solved

good resource explaining how to set expiry times for php

Posted on 2006-11-14
2
211 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 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now