Jump to content

Help me $5 for the real answer :)


cirkos

Recommended Posts

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

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.

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

 

freefiverszt5.jpg

 

This picture is taken from http://www.freefivers.co.uk

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.