Justin is perfectly correct. Sessions are really the
way to perform this task (sessions actually use
cookies in most scenarios).
However, if you need to track the user for longer than
they will be at your site (i.e., they close the
browser and come back a week later, like you said), it
should be noted that you cannot use sessions alone,
and MUST use a cookie.
--- Justin French <[EMAIL PROTECTED]> wrote:
> on 20/08/02 7:01 AM, Andy ([EMAIL PROTECTED])
> > Hi there,
> > I am wondering if following scenario would be
> > - Create a unique referer id to make sure that the
> visitior has been refered
> > by a particular person. (e.g. server.com?ref=20)
> > - The visitor enters the site and browses around,
> but the ref=20 should not
> > be stored inside the url, but in a coockie
> yes, or alternatively in a session
> > - If the visitor signs up and there is a referer
> id assign the person who
> > refered it some points.
> > The problem I see, is how to make sure that the
> refered id does not get lost
> > and in case the person comes back another day
> still be able to asign the
> > person who refered it the points.
> > Has anybody a good suggestion on that?
> make sure the cookie has a long expiry date... say a
> month, or whatever you
> think is reasonable.
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php