Too Advanced? Re: Cookies & Hidden Image
| From: | Nicole | Date: | Wed, 03 Sep 2003 20:57:58 +0000 |
| Subject: | Too Advanced? Re: Cookies & Hidden Image | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161592@lists.php.net to get a copy of this message | ||
Is this question too advanced for this newsgroup? Is there a better
newsgroup to post this one too?
Thanks,
--
Nicole
"Nicole" <430ntr3k@aeontrek.com> wrote in message
news:20030903001623.18738.qmail@pb1.pair.com...
> Hi,
>
> I am working on a script that uses cookie to store some info on the client
> side. The user will click a link that contains info about where the link
> was placed. The script will then store that info so that when the user
> returns later and makes a purchase, I can see where they came from.
>
> The problem I am having is this:
>
> The link is a redirect url that first goes to one domain where the cookie
is
> created by. Then they are taken to the site where products are sold.
>
> Then, after they make a purchase, they are taken to a thank you page that
> has a hidden tracker to track that sale.
>
> <img src=http://trackerurl.com/?var=1&var=2&blahbla
> height=0 width=>
>
> The image loads the script from a different domain (where the cookie was
> initialy created by). The problem now is that the script gets a blank
> cookie when using the hidden image to load the script.
>
> So does anyone know why this is happening?
>
> I have setCookie('CookieName', $value, $expires);
>
> Then I try to retrieve that cookie again later with
$_COOKIE['CookieName']
> ... but the value stored is not there when the script is called from the
> hidden image. HOWEVER, the value is there when the script is called
> directly.
>
> Any ideas?
>
> Thanks!!
>
> Nicole