Cookies or Sessions or something else


#1

I am trying to figure out a way that I can track when user’s sign up on my site coming from referring urls.

Say they come from a link in facebook. they wonder through the sight then sign up for our newsletter. I want to be able to know where that particular user came from in the beginning. Would I use cookies or sessions?

I had thought about using a hidden field on the page, or adding some code at the top that would session from page to page. But don’t know which is easiest and which is best.

Thanks is advance.


#2

Hi.

Uhm, cookies are one of at least two methods of implementing a session.

With a cookie, the web browser automatically sends back a key-value pair for certain web pages.

With a parameter, the key-value pair is provided on a GET request as part of the query string, or in form data on a POST request.

So if you use the latter method, all the links and forms on your web page have to be generated dynamically to include the key-value pair holding the session identifier somehow.

Some CGI applications will fallback to the latter method if the browser doesn’t support or blocks cookies. Others won’t work without cookies, such as the DreamHost Web Panel.

:cool: openvein.org -//-