0

i set cookies to expire at session end by just leaving time out. this works fine if i close the entire browser. but if i just close the tab w my script on it it doesn't expire cookies. I really would like for them to expire even in tabbed browser. any ideas? here's my cookie page:

<?php

// Write the current month and year into cookies and return back to index.php

$month=$_GET['m'];
$mon=$_GET['mon'];
$year=$_GET['y'];
$ti= $_GET['ti'];





setcookie("month", $month);
setcookie("mon", $mon);
setcookie("year", $year);
setcookie("ti", $ti);

header ("location: index.php");



?>
2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by fuston05
0

If you know when your session is done, you can delete the cookie and see if that does it. If the session just dies without warning (and you don't explicitly delete it)then I think that the cookie will hang around until the browser is closed and opens again.

0

so you dont think there is a way to do it then? I wasnt sure. I dont want to have to manually delete them, because this needs to be a fully self functioning app for use of others as well. It doesnt cause a big flaw in my app, just a lil annoyance is all. it may even be acceptable, was just hoping to make cookies go away even when tab is closed and browser is still running. thanks for your reply :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.