austrainer Posted January 10, 2008 Share Posted January 10, 2008 Hi the code is <td height="25" colspan="3" align="center"><div align="left">Your referral link is - <a href="<?php echo $site_url; ?>index.php?refId=<?php echo $_COOKIE['userId']; ?>" target=_blank><?php echo $site_url; ?>index.php?refId=<?php echo $_COOKIE['userId']; ?></a></div></td> The results are if you move your cursor over the result you see a full correct link eg: http://mydomain.com/index.php?refid=1 However the text reference on screen is "index.php?refid=1" without the "" I want the text reference on screen to read the full correct link. Can anyone help with any suggestions? Thanks Scott (edited to put in the tags) Quote Link to comment https://forums.phpfreaks.com/topic/85341-my-url-variable-isnt-passed-in-this-statement-any-ideas-why/ Share on other sites More sharing options...
kenrbnsn Posted January 10, 2008 Share Posted January 10, 2008 Why don't you put everything you want to display in a temporary variable and display that? <?php $tmp = $site_url . 'index.php?refId=' . $_COOKIE['userid']; ?> <td height="25" colspan="3" align="center"> <div align="left">Your referral link is - <a href="<?php echo $tmp ?>" target=_blank><?php echo $tmp ?></a> </div> </td> This way you're sure you're echoing the same information. Ken Quote Link to comment https://forums.phpfreaks.com/topic/85341-my-url-variable-isnt-passed-in-this-statement-any-ideas-why/#findComment-435487 Share on other sites More sharing options...
austrainer Posted January 11, 2008 Author Share Posted January 11, 2008 Why don't you put everything you want to display in a temporary variable and display that? <?php $tmp = $site_url . 'index.php?refId=' . $_COOKIE['userid']; ?> <td height="25" colspan="3" align="center"> <div align="left">Your referral link is - <a href="<?php echo $tmp ?>" target=_blank><?php echo $tmp ?></a> </div> </td> This way you're sure you're echoing the same information. Ken Hi Ken Thanks - I tried that and got the exact same result - the $site_url variable and the $tmp variables are still not being echoed to screen. They are there in the url if you mouse over the link but won't display. the 'index.php?refId=' displays with the hyperlink active on it. I wonder if there is something else going wrong? Cheers Scott Quote Link to comment https://forums.phpfreaks.com/topic/85341-my-url-variable-isnt-passed-in-this-statement-any-ideas-why/#findComment-436882 Share on other sites More sharing options...
Cazrin Posted January 11, 2008 Share Posted January 11, 2008 Just an idea and not sure if it would solve anything, have you tried it with " " around your _blank? So it would be target="_blank"> That's the only thing which looks odd to me, everything else seems fine. Quote Link to comment https://forums.phpfreaks.com/topic/85341-my-url-variable-isnt-passed-in-this-statement-any-ideas-why/#findComment-436912 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.