I have just finished programming my new website.
Its a freelancer site.
I am going to create a referral programme where you'll earn 20% of the user(s) you refer to the site.
I was thinking when somone clicks your link, it'll add your userid or username to the session (possibly $SESSION['referer'] = $GET['user']; - something like that)
so if your browsing other pages the info is still there.
Once the user registers i'll check if the 'referer' has a username and if it does it executes a piece of code (adds to referral table) and then unsets $_SESSION['referer']. if it doesnt contain information then it'll be ignored.
Does that sound ok or are there other ways?