PDA

View Full Version : &clickref with php


PipSqueak
26-02-09, 17:03
I'm not a very good programmer so I really need help in this. My tracker script uses cookies for tracking and in order to get information of the cookie, it uses this:

<?php echo $_COOKIE['visitor_id'];?>

I tried this:

$sClickRef = "clickref=<?php echo $_COOKIE['visitor_id'];?>"; # awin clickref


and

$sClickRef = "clickref='.echo $_COOKIE['visitor_id'];.'"; # awin clickref


but it gave me an error.

Thanks in advance

currentstyle
26-02-09, 18:09
$sClickRef = "clickref=".$_COOKIE['visitor_id'];

should do the job, only use echo when you want to display what you're echoing to the page