How would I make a referral system that would give a user a unique referral link and when others click it and complete a certain action, the other user would get credited?
may be this will help you http://www.devshed.com/c/a/MySQL/Building-a-Simple-Affiliate-System-in-PHPMySQL/ i hope i did not broke any rules