sam06 Posted February 14, 2008 Share Posted February 14, 2008 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 More sharing options...
carobee Posted February 14, 2008 Share Posted February 14, 2008 whats the error shown? Link to comment https://forums.phpfreaks.com/topic/91049-should-be-very-easy/#findComment-466653 Share on other sites More sharing options...
harristweed Posted February 14, 2008 Share Posted February 14, 2008 try: <?php header( 'Location: http://scripts.affiliatefuture.com/AFClick.asp?affiliateID=31666&merchantID=$_GET[merch]&programmeID=$_GET[prog]&mediaID=0&tracking=GFC&url=' ) ; ?> Link to comment https://forums.phpfreaks.com/topic/91049-should-be-very-easy/#findComment-466654 Share on other sites More sharing options...
kenrbnsn Posted February 14, 2008 Share Posted February 14, 2008 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 More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.