Hi, I have a site that has a referral link in it. The referral link is displayed normally and I also want to add a banner. However, I'm not too sure how to display the banner code with the link in it. user link: http://site.com/index.php?page=register&invcod=$arrusr[0] PHP: code needed to display(it should work like the link above and display the users referral link in it and not the $ arr usr part): <a href="http://site.com/index.php?page=register&invcod=$arrusr[0]"><img src="http://vivas.me/images/user_banner.gif" border="0"></a> PHP:
I don't know exactly what your asking, but have an idea. You just want to display the link and banner, correct? Not a banner depending upon the value of the link? Try... <a href="http://site.com/index.php?page=register&invcod=<?php echo $arrusr[0]; ?>"><img src.... /></a>
no the script displays a referal url, that url is different for every person, but the $ arr usr part is the one showed in the code of the script so it would be great if each person had their own url already inserted into the banner code, so they could just highlight it and paste it somewhere i tried various things like echo and code both php and html but no luck
try this echo '<a href="http://site.com/index.php?page=register&invcod='.$arrusr[0].'"><img src="http://vivas.me/images/user_banner.gif" border="0"></a>'; PHP:
<form name="refcode"> <input type="text" name="code" style="width:500"> </form> HTML: <?php $refcode = "<a href=http://site.com/index.php?page=register&invcod=$arrusr[0]><img src=http://vivas.me/images/user_banner.gif></a>"; ?> PHP: <script type="text/javascript"> document.refcode.code.value = '<?php echo $refcode;?>'; </script> Code (markup): Put it all together and woalaa ..
Just for the heck of valid html though, you should have double quotes, lol. <?php $refcode = '<a href="http://site.com/index.php?page=register&invcod='.$arrusr[0].'"><img src="http://vivas.me/images/user_banner.gif" alt="banner" /></a>'; ?> PHP: