Jump to content

Delete a cookie when page closes - how?


Revos

Recommended Posts

From PHP.net

setcookie ( string name [, string value [, int expire [, string path [, string domain [, bool secure [, bool httponly]]]]]] )
expire- If not set, the cookie will expire at the end of the session (when the browser closes).

See more at [url=http://www.php.net/manual/en/function.setcookie.php]setcookie()[/url]

Orio.
Link to comment
Share on other sites

I have a problem:
I got page name X and it creates a cookie and opens page named Y
in page Y I check it cookie exists.
now if I dont put expire it deletes the cookie when I close page X and open page Y.
I want to create a cookie in page X(I know how)
I want to delete a cookie when I close page Y(how?)
Link to comment
Share on other sites

Tried it already...
listen I got 2 pages, with page 1 I create a cookie\session.
With page 2 I will check if the cookie\session exists.
I want to create a cookie\session with page1 and close page1 and open page2, with page2 to check if cookie\session exists then show example.."blabla" and when I will close page2 the cookie\session will be deleted...is it possible?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.