Ok, mezz here just new and having so much trouble with this coding. I imagine the mistake I'm making is small but I just can't work it out.

I'm a newbie at this so any answers will need to be in baby speak.

What I want:
I want to track a surfer's ID number through my site. They click on a google ad that has an ID in it and come to my page. While on my page, instead of immediately clicking on the offer, they see an article they can read to find more information before they buy and click on the link. I want their ID number to follow them to the article and then back again so that when they do click on my offer I know which ad they arrived from in the first place.

this is where I am.

have this cookie code in the header of my page above <html>

<?php
setcookie($cookie['kid']);
?>

the id is on that page I arrive at.

then in the <body> section I have this:

<?php

if( isset($cookie['kid']) ) {
$sub_id = $cookie['kid'];
}

?>

but when I click on a link the ID doesn't go through. What am I doing wrong?

I do hope I can find someone who can help. I've been trying to find the answer for months. I'm going a little spare

What I understand from your description is that now you are able to set a cookie and you are able access this cookie in another page also.

But I did not understand your sentence when you said it should not be up there...why it should not be up there...once you set a cookie it will remain up till it expired.

Second from your original problem you said you want to track your site visitors who are coming from google ads. So if that is the case then set your cookie in a page where your visitors are landing and then access that cookie in a page where you are taking orders.

Its being displayed at the top of your page because you have echoed it using "echo" function. Just remove this function and you won't get it on your page.

Regarding why it is not being recorded, I don't see source code to record it thats why it is not being recorded. You have to write logic to record it. Now I don't know where do you want to record it. So just check what are you doing for other pages, and then do same for this page as well;

Hello,
I have visited this php script forum. I am also beginner in php.so, that's forum is very beneficial for me and it gives me lots of information that will be very useful to me in the future.I have read this question but i am note able to give your answer right now,sorry for that.So i am giving you this expert link for your queries.
thanks.
----------------------
[url=http://www.ezdia.com/epad/ati-radeon-hd-5670-series-graphics-card-amd/6972/] ATI RADEON HD 5670 â€“ SERIES GRAPHICS CARDS FROM AMD [/url]