Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 07-05-2005, 07:09 PM Referral Script ?
Average Talker

Posts: 23
Trades: 0
I need to find a good referral script, that people can signup.then they use like
vexhosting.com/in.php?referid=myname
and then when someone goes there with that referr names there and signups up it will tell me like 1 Signup for bla bla..plz!
I also have WHM,WHMAP,cPanel so...ya.
__________________
VexHosting from just 4$/month !

Please login or register to view this content. Registration is FREE

For $4/Month you get 40GB Space,30GB Bandwidth!

Please login or register to view this content. Registration is FREE
EldoonFX is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-06-2005, 07:44 AM
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
Ok, i just edited this script i had for something different in like 5 mins so hopefully it works/helps you out.

PHP Code:

<?php

//include db info
include('config.php');
        
//get referid
$referid $_GET['referid'];

//get referid info from database
$result_query mysql_query("SELECT * FROM yourtable WHERE referid='$referid'");

//get referid info fields
$result_array mysql_fetch_array($result_query);

//check num rows availablw (maybe use for error checking)
$num_rows mysql_num_rows($result_query);

//getnumber of referals so far
$refer_count $result_array['refer_count'];

//increment by one
$refer_count++;

//create query string to store new number
$query "UPDATE youtable SET refer_count='$refer_count' WHERE referid='$referid'";

//run query to update database
$result mysql_query($query);

//print errors if it doesn't work
if ( ! $result)
        die (
"Couldn't update refer count item" .mysql_error());
        
//send them on to a the next page
header("Location: http://www.yoursite.com");

?>
Stoot
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 07-06-2005, 10:09 PM
Average Talker

Posts: 23
Trades: 0
Uh..more info..like how do i add people to this? see info? and weres config.php?
__________________
VexHosting from just 4$/month !

Please login or register to view this content. Registration is FREE

For $4/Month you get 40GB Space,30GB Bandwidth!

Please login or register to view this content. Registration is FREE
EldoonFX is offline
Reply With Quote
View Public Profile
 
Old 07-07-2005, 07:40 AM
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
This solution was presuming you are using PHP and a mySQL database - i think this would be the best thing to use for it but if you're not then it's of no use.

The config.php is just a file that has all the information to connec to the database
, e.g.

PHP Code:

$link 
mysql_connect("localhost""root""password");
if (! 
$link)
    die(
"Couldn't connect to MySQL");
    
mysql_select_db("database_name") or die ("Couldn't open database"); 
You can add people to this by making a table in the database that has fields called 'refer_count' and 'referId' and then adding a row with the relevant information.

You will need SOME knowledge of php and mysql to implement it but not that much so good luck!

Stoot
stoot98 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Referral Script ?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32901 seconds with 12 queries