Jump to content

Should be very easy...


sam06

Recommended Posts

Hi,

I am trying to make the link http://www.com/link.php?merch=????&prog=????

go to http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=31666&merchantID=????&programmeID=????&mediaID=0&tracking=GFC&url=

 

My code for link.php is

<?php
header( 'Location: http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=31666&merchantID=<?php echo $_GET["merch"]?>&programmeID=<?php echo $_GET["prog"] ?>&mediaID=0&tracking=GFC&url=' ) ;
?>

But unfortunetly I am having no luck;

I'm pretty sure I don't need the extra <?php's in the link, but I don't know how to make it so it process the php and not puts the actual code into the link.

 

Thanks,

Sam

 

Link to comment
https://forums.phpfreaks.com/topic/91049-should-be-very-easy/
Share on other sites

Variables within single quotes are not expanded. Try:

<?php
header( 'Location: http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=31666&merchantID='  . $_GET["merch"] . '&programmeID=' .  $_GET["prog"] . '&mediaID=0&tracking=GFC&url=' ) ;
?>

 

Ken

Link to comment
https://forums.phpfreaks.com/topic/91049-should-be-very-easy/#findComment-466657
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.