Forum Moderators: coopster

Message Too Old, No Replies

How would I do this *explanation in msg body*

         

btvsrocks

9:15 pm on Aug 20, 2003 (gmt 0)



I want to have a contest at my site which involves A PART where I'd want the visitors to get "points" for referrals.

When they sign up, or enter the contest, they get a unique URL afterwards to refer their friends. And when their FRIENDS sign up via their friend's link, the friend #1 gets credit/points.

I was wondering how can I do this with php? I looked all over hotscripts.com and cannot find anything. I would hate to do it manually or ask people to just say "use my name as a referal" b/c that wouldn't work as well. I've seen a lot of sites have this sort of system but I just don't know how to do it...

vincevincevince

10:16 pm on Aug 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



start a session at the beginning of the page with the?referrer=3135 part in the url
store the $_REQUEST['referrer'] value as a session variable
when you finally have recieved the signup data for the new client, do a mysql update to increment the number of points/credits of the user who's ID is in the session variable