Re: newbie simple problem with cookie



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

David Graham schrieb:
"David Graham" <david.graham18@xxxxxxxxxxxx> wrote in message
news:85vWf.38278$u31.10281@xxxxxxxxxxxxxxxxxxxxxxx
Hi
Why does my cookie not get set?
I just get "Your last visit was - " and nothing else
thanks
Dvaid Graham

<?php
//Calculate 60 days in the future
//seconds * minutes * hours * days + current time
$inTwoMonths = 60 * 60 * 24 * 60 + time();
setcookie(lastVisit, date("G:i - m/d/y"), $inTwoMonths);

try to set lastVisit between ' and '
If this doesn't work, try to use path and domain parameters as well.

...
Regards
Stefan



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.1 (MingW32)

iD8DBQFEKpBUyeCLzp/JKjARAmZgAJ9MeA+PfjCJbYzBfMIrzRfIp5GAbgCffU7q
k9j0Ck845iS8wirNFexolvA=
=PmaT
-----END PGP SIGNATURE-----
.



Relevant Pages

  • Re: [PHP] base64-encoding in cookies?
    ... The sender is in the driver's seat and the receiver must follow suite. ... PHP application is usually what set the cookie in the first place. ... You have control over the value you insert into the cookie. ...
    (php.general)
  • Re: [PHP] base64-encoding in cookies?
    ... PHP application is usually what set the cookie in the first place. ... $_SERVER fields are dependent on your http server. ... but my request is for documentation of the fact ...
    (php.general)
  • Re: Sessions
    ... click the link and in aoltest3.php the session variable is visable. ... Registered serializer handlers php php_binary wddx ... session.name PHPSESSID PHPSESSID ... see the PHPSESSID, in a cookie, or in the URL. ...
    (comp.lang.php)
  • Re: Cross-domain cookie updating ?
    ... It's not strictly a PHP question, but something that PHP guys would know the answer to. ... If the file being returned has updated cookie information in the response header, then I imagine the cookies for example.com get updated. ... What if the JS file it's requesting is actually to a different unrelated domain server that's going to return a JavaScript file with updated cookies in the response header. ... As far as I was aware, the only way a server can set a cookie in the response is by using server-side scripting. ...
    (comp.lang.php)
  • Re: Cross-domain cookie updating ?
    ... It's not strictly a PHP question, but something that PHP guys would know the answer to. ... If the file being returned has updated cookie information in the response header, then I imagine the cookies for example.com get updated. ... What if the JS file it's requesting is actually to a different unrelated domain server that's going to return a JavaScript file with updated cookies in the response header. ... As far as I was aware, the only way a server can set a cookie in the response is by using server-side scripting. ...
    (comp.lang.php)