Re: cookies not remembered between browser shutdown and browser restart.. :(

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Jeffry,

Am 2018-03-28 hackte Jeffry Killen in die Tasten:
>> On Mar 27, 2018, at 7:57 PM, Michelle Konzack
>> <linux4michelle@xxxxxxxxxxxxxxx> wrote:
>> Am 2018-03-27 hackte Rene Veerman in die Tasten:
>>> <html>
>>> <body>
>>> <?php var_dump($_COOKIE);?>
>>> <script>
>>> document.write (document.cookie);
>>> document.cookie = 'abc=def';
>>> </script>
>>> </body>
>>> </html>

> It depends on what set the cookie to begin with.

Please look at the code of the OP.
He set the cookie from the JavaScript and NOT PHP.

He is just reading the value of the cookie using PHP.

> 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)

I do not nee this infos, because I code PHP since some time!

> Javascript should have nothing to do with it unless there is
> javascript
> code sourced and run in the browser to effect cookies.

Please loock at the code again!

> They can be
> set and remove or changed with javascript. But it is more complicated
> than php. The cookies are read as a string and have to be parsed
> and analysed by javascript and added to, removed or revised.
>
> JK

Have a nice day

-- 
Michelle Konzack        Miila ITSystems @ TDnet
GNU/Linux Developer     00372-54541400


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux