Need help with php tracking across several pages
I want to generate an outbound affiliate link with keyword tracked from Adwords to the affiliate program "subid=". The outbound link is generated in an iframe, which what may be causing my problem.
Here is what is being generated in the page source:
<iframe src="http://affiliateprogram.com/&subid1=<?php echo $_GET['kw'] ;?>" frameborder="0"></iframe>
For some reason my <?php echo $_GET['kw'] ;?> isn't converting to kw which is my keyword that is being tracked.
Here is the code from the php file that generates the above link:
<iframe src="<? echo "$url"; ?>" frameborder="0"></iframe>
The $url is generated at the top of the page as: $url=$row["url"];
I don't know a lot of php but I've tried session tracking and everything else I can find on the net, but I might not have been doing it right.
Here is what is currently on my landing page (index.php)
session_start();
if(isset($_GET['kw']))
$_SESSION['tracking'] = $_GET['kw'];
I don't know if I've provided enough information, but does anyone know how to solve my problem?
I've also tried adding the kw to the $url=$row["url"], but probably wrong. I tried something like:
$url=$row["url" + "<?php echo $_GET['kw'] ;?>"]
but it generated errors on page load.
Anyone have any ideas?
Thanks,
Dennis
~Dave