Referral system PHP MySql Source Code