Re: Cookie not getting set
| From: | James | Date: | Mon, 12 May 2003 21:27:02 +0000 |
| Subject: | Re: Cookie not getting set | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147353@lists.php.net to get a copy of this message | ||
any gaps before or after the <? ?> wil constitute output beofre headers
being sent and the cookie will not be set. Also, try enclosing the time
equation and more importantly why are you doing those multiplications again
and again, use
time()+totalTimeAmount!
"Mike Morton" <mike@webtraxx.com> wrote in message
news:BAE57D81.FE14%mike@webtraxx.com...
> Sorry - you got a bit of code there that I was trying to work with other
> things, it does not work with .vtc.com any better.
>
>
>
> On 5/12/03 4:29 PM, "Jennifer Goodie" <goodie@apollointeractive.com>
wrote:
>
> > Try putting ".vtc.com" as the domain.
> >
> >> -----Original Message-----
> >> From: Mike Morton [mailto:mike@webtraxx.com]
> >> Sent: Monday, May 12, 2003 1:25 PM
> >> To: php-general@lists.php.net
> >> Subject: [PHP] Cookie not getting set
> >>
> >>
> >> This code works in IE6 PC, but not IE5 or Safari on a Mac:
> >>
> >> setcookie("dealercode", "33",
> >> time()+60*60*24*365,"/","vtc.com",0);
> >>
> >> header('Location: login.php');
> >>
> >> This code is executed under:
> >> apex.vtc.com
>
> --
> Cheers
>
> Mike Morton
>
> ****************************************************
> *
> * Tel: 905-465-1263
> * Email: mike@webtraxx.com
> *
> ****************************************************
>
> "Indeed, it would not be an exaggeration to describe the history of the
> computer industry for the past decade as a massive effort to keep up with
> Apple."
> - Byte Magazine
>
> Given infinite time, 100 monkeys could type out the complete works of
> Shakespeare. Win 98 source code? Eight monkeys, five minutes.
> -- NullGrey
>