473,396 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

set session cookie expiration date

Hello,

I use PHP session cookie to store an id number.

I know how to set a cookie expiration date using the setcookie function, but
how to set an expiration date when the cookie is created by the
session_start function ?

I know the cookie expires after the session ends, but when I look at my HTTP
headers, the cookie's expiration date created by the session is set to 19
Nov 1981. Something must be wrong.

Thanks for your help,

Christophe

Jul 17 '05 #1
2 4487
On Tue, 21 Dec 2004 16:07:21 +0100, Christophe Lance
<ch**************@jcp-marketing-event.ch> wrote:
I use PHP session cookie to store an id number.

I know how to set a cookie expiration date using the setcookie function, but
how to set an expiration date when the cookie is created by the
session_start function ?


http://uk.php.net/manual/en/function...kie-params.php

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2

I know how to set a cookie expiration date using the setcookie function, but
how to set an expiration date when the cookie is created by the
session_start function ?


http://uk.php.net/manual/en/function...kie-params.php

Thanks Andy for your info.
Christophe

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
How does one read and write the cookie expiration date. At the moment my code is returning a value BUT a garbled value: '//Write cookie... Response.Cookies("Propsect").Expires = Date() + 1 ...
3
by: Brett | last post by:
I'd like to set a session cookie that expires once the browser is closed. I've tried: document.cookie = "wm_javascript=" + escape("SomeName|" + window.document.referrer); with no expires. ...
2
by: Frederic Gignac | last post by:
Hiya all, My buddy and I got a bug with the expiration date of a cookie. When we want to look out the expiration date, the only thing we've got, it's 01/01/0001. As we know, when we want to...
3
by: Ben | last post by:
Hi, I'm sending out a session cookie. That is a cookie that has no expiration date. When I surf through the site, no problems, but if I close the browser and open it back up, the cookie is still...
2
by: Earl Teigrob | last post by:
I am trying to find storage mechanism that will store a variable until the browser window is closed. A query string variable would be my first choice for this but that is not easily done in my...
15
by: Oleg Leikin | last post by:
Hi, (newbie question) I've created some simple .NET ASP application that should store cookies at the client machine. According to the documentation cookie expiration time is set via...
9
by: Mike Reed | last post by:
I must be having a "senile" day! I cannot recall, nor get to work, code to read a cookie's expiration date/time in an ASP page/VBScript. What am I missing? *** Sent via Developersdex...
5
by: SJ | last post by:
Hi, In my website, i have a cookie that allows the user to remain logged in for upto 90days. So I'm setting the cookie expiration time to 90 days in the future from the time the user logs in....
4
by: Yonih | last post by:
Hey Yall, I am trying to incorporate a Once Per session Cookie that will expire once the browser is closed so some one who comes to my website will see my popup the first time her visits the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.