I have a link on my landing page that links to clickbank. All of my landing pages have <?php $seedvar=$_GET['id'];?> Code (markup): at the top of the page. "id" is a 4 digit number This is my link: http://myid.vendorid.hop.clickbank.net/?tid=<?php echo $seedvar;?> Code (markup): So I click the link and the "tid" value is passed all the way to clickbank. This works well. But I do not want my page to link directly to clickbank. I want to go through a php redirect: links/index.php This redirect: links/index.php contains <?php header("Location: http://myid.vendorid.hop.clickbank.net?tid=<?php echo $seedvar;?>");?> Code (markup): So when I click on links/index.php from my referring page I would have thought that the "tid" value is just passed along but it is not. I'm not too hot on php so can anyone see where I have gone wrong and how I should do it? Thanks
You can not write php tag with in php tag Just use like this, <?php header("Location: your site here ?tid= $seedvar ");?>
Thank for your reply, I tried what you suggested. On my php landing page I have a coded link <a href="http://domain/index.php?tid=<?php echo $seedvar;?>">Test</a> Code (markup): That generates this link in the browser: <a href="http://domain/index.php?tid=test555">Test</a> Code (markup): Contents of: http://domain/link/index.php are: <?php header("Location: http://myid.vendorid.hop.clickbank.net/?tid=$seedvar"); ?> Code (markup): And it still does not pass the data over. I feel something is not quite right, I just can't see it. Could you advise again please? Thank you
My landing page link: <a href="http://domain/link/index.php?tid=$seedvar">Test</a> Code (markup): Which displays data in footer as I have <?php echo $seedvar;?> Code (markup): in the footer. I just tried this in my http://domain/link/index.php redirect <?php $seedvar=$_GET['tid']; header("Location: http://myid.vendor.hop.clickbank.net/?tid=$seedvar"); ?> Code (markup): Still not passing the data.
I just tried it this way too: <?php $tid=$_GET['seedvar']; header("Location: http://myid.vendor.hop.clickbank.net/?tid=$seedvar"); ?> Code (markup): Still no data
It's cool I got it fixed. I put this on the landing page <a href="http://domain/links/index.php?tid=<?php echo $seedvar;?>">Test</a> Code (markup): And this in the redirect: header("Location: http://myid.vendor.hop.clickbank.net?tid=".$_GET['tid']); exit(); Code (markup): And it worked Thank you for all your help, much appreciated. Regards Mike