Current location: Hot Scripts Forums » Programming Languages » PHP » Referral links


Referral links

Reply
  #1 (permalink)  
Old 07-31-05, 04:41 PM
Balkee867 Balkee867 is offline
Newbie Coder
 
Join Date: Jul 2005
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Referral links

This does not have to be in PHP, but I am looking for a way to give each memer of my site a referral link. I will need to give each member a link, and if someone signs up under that link, then it is automatically marked in the link owner's account. I can't seem to find a script to do this.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-31-05, 04:50 PM
DetroitGuy DetroitGuy is offline
Newbie Coder
 
Join Date: Jun 2005
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Just create an ID row on the table and use that ID as the referral link.

http://www.yoursite.com/?r=$id

Then just use GET when processing it.

PHP Code:

$user $_GET['r']; 


Last edited by DetroitGuy; 07-31-05 at 04:54 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 07-31-05, 05:09 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
and expanding on DetroitGuy's code, have a table called referrals and in there have 2 fields - userID and hits - then use:

PHP Code:

mysql_query("UPDATE referrals SET hits=hits+1 WHERE userID='$user'") or die(mysql_error());

header ("Location: homepage.php"); 
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Exchange links with a growing links directory FNxx General Advertisements 0 07-07-05 10:16 AM
new links directory, seeking links FNxx Traffic Exchange 0 06-02-05 10:10 AM
Referral links are not allowed! NeverMind General Advertisements 0 05-22-05 05:16 AM
links exchange with scripts, hosting, SEO, design, and other webmasers related sites cms-master.com Traffic Exchange 1 01-24-05 06:08 PM
How do I cash in referral points? CodeHouse Hot Scripts Forum Questions, Suggestions and Feedback 2 09-29-03 04:43 PM


All times are GMT -5. The time now is 11:58 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.