cirkos Posted April 5, 2008 Share Posted April 5, 2008 Hi guys, i really need help and i gonna give 5$ over paypal for the person there can help my out. All my users have a database where all seperal have an id, and right now i have done some outsoucing so they have made a refferal system i want people so they can see their refferal id like http://umit/pengesafari/danish/index.php?user_id=23 I allready now the code is http://umit/pengesafari/danish/index.php?user_id='.$_SESSION['f_id'] But how should i use it i have allready tried <? echo "http://umit/pengesafari/danish/index.php?user_id='.$_SESSION['f_id']"; ?> But that did not help, please help me thanks. Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/ Share on other sites More sharing options...
HaLo2FrEeEk Posted April 5, 2008 Share Posted April 5, 2008 So you want the user_id to be visible in the url, or you want the url with the user_id included to be printed onto the page? echo prints them to the page, to have them appear in the url, you could, at worst, do a header redirect like this: header("Location: http://umit/pengesafari/danish/index.php?user_id=".$_SESSION['f_id']); to print it to the page, you confused your code, try this: echo "http://umit/pengesafari/danish/index.php?user_id=".$_SESSION['f_id']; That should get both done. Make sure you've called session_start() on each page using the session variables or they're either return empty, or even throw an error. Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509850 Share on other sites More sharing options...
Barand Posted April 5, 2008 Share Posted April 5, 2008 Are you trying to create a link? <?php session_start(); $url = 'http://umit/pengesafari/danish/index.php?user_id='.$_SESSION['f_id']; echo "<a href='$url'>Referral</a>"; Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509851 Share on other sites More sharing options...
cirkos Posted April 5, 2008 Author Share Posted April 5, 2008 Are you trying to create a link? <?php session_start(); $url = 'http://umit/pengesafari/danish/index.php?user_id='.$_SESSION['f_id']; echo "<a href='$url'>Referral</a>"; It works now with no error the refferal link link to it with the users id number, but i dont want it to be a link i want it to be like This picture is taken from http://www.freefivers.co.uk Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509883 Share on other sites More sharing options...
Barand Posted April 5, 2008 Share Posted April 5, 2008 http://www.dynamic-tools.net/toolbox/copyToClipboard/ Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509889 Share on other sites More sharing options...
cirkos Posted April 5, 2008 Author Share Posted April 5, 2008 http://www.dynamic-tools.net/toolbox/copyToClipboard/ Sorry i dont want copy to clipboard i just want it to be in text like the text above so people can see their refferal web adress and send it to people. Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509900 Share on other sites More sharing options...
Barand Posted April 5, 2008 Share Posted April 5, 2008 <?php session_start(); $url = 'http://umit/pengesafari/danish/index.php?user_id='.$_SESSION['f_id']; echo "<input type='text' name='referral' value='$url' size='60' >"; Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509905 Share on other sites More sharing options...
cirkos Posted April 5, 2008 Author Share Posted April 5, 2008 <?php session_start(); $url = 'http://umit/pengesafari/danish/index.php?user_id='.$_SESSION['f_id']; echo "<input type='text' name='referral' value='$url' size='60' >"; Thanks it worked please pm your paypal mail and i will send the money Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509911 Share on other sites More sharing options...
Barand Posted April 5, 2008 Share Posted April 5, 2008 I was going to post the link to the phpFreaks donation page but it seems it was a casualty along with the main site Link to comment https://forums.phpfreaks.com/topic/99665-help-me-5-for-the-real-answer/#findComment-509915 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.