Re: [PHP] cookies not remembered between browser shutdown and browser restart.. :(
- Date: Tue, 27 Mar 2018 23:16:17 -0700
- From: Jeffry Killen <jekillen@xxxxxxxxxxx>
- Subject: Re: [PHP] cookies not remembered between browser shutdown and browser restart.. :(
> On Mar 27, 2018, at 7:57 PM, Michelle Konzack <linux4michelle@xxxxxxxxxxxxxxx> wrote:
> Good morning,
> Am 2018-03-27 hackte Rene Veerman in die Tasten:
>> i have the following test script:
>> <?php var_dump($_COOKIE);?>
>> document.write (document.cookie);
>> document.cookie = 'abc=def';
> I have codede JS 15 years ago and do not know about todays stuff,
> but can it be, that it is only a session cookie?
> Thanks in advance
It depends on what set the cookie to begin with.
If it was php, it is either a call to setCookie, or a session cookie.
I don't work with cookies accept for limited specific tasks. But
in calling setCookie one of the arguments is the time to live value.
If there is no time to live value passed, the cookie expires when
the browser closes... as I understand it. Look at the php manual:
http://php.net/manual/en/function.setcookie.php (or find it in your
preferred language, this the english version. You can use the search
box at the upper right hand corner. But it may be different for languages
written and read right to left)
code sourced and run in the browser to effect cookies. They can be
than php. The cookies are read as a string and have to be parsed
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php