Hope you can help. I'm hoping to include code on our site to enable me to know, when someone submits an enquiry exactly how they got onto our site. www.cavaliermailing.com I always ask enquirers how they found us (and it's usually Google PPC) but it would be useful to be pre-armed with that information. I guess it would be done by means of a session cookie but beyond that I'm stumped. Cheers CW
At the top of each page you need to check if a session is registered. If not then register a new cookie and reference that to a listing in a database that contains the session id, the referrer details and a timestamp. You can track other things as well if you wish. Then when your form is submitted you send the contents of the database row as well as the information. There are lots of scripts around to get the search terms from the referrer details.