Forum Moderators: mack

Message Too Old, No Replies

Creating member promotional/referral url

         

webventures

10:51 pm on Feb 2, 2006 (gmt 0)

10+ Year Member



What a marvelous site this is! A vast warehouse of fantastic information! Bravo to the founder(s) and all the helpful members!

I started learning php a month ago. After years of building static sites, you can imagine how thrilled I was the first time I was able to connect to the database from my first dynamic test site! PHP/MySQL rocks!

I have since been able to successfully create a membership site with sign-up, send activation link via email including encrypted password, login, and logout. Now I have hit a stumbling block.

What I have been looking to learn how to do next is quite common and I have spent considerable time searching at this site and other places for some specific guidance. Driving my phpmobile, it is time to stop the car and ask for directions :-)

I want to create member referral links so that my members will be able to promote the site, ie. abcxyz.com/?ref=username. Upon registration by a new member, this link would appear in their profile section. I would also like to be able to keep track of and display hits to a member's referral page when they are promoting (for contest purposes). All referrals that a member generates will also be displayed in their member area.

Pretty common stuff, right? Could someone please direct me to a resource that would put me on the right track to learn how to accomplish those things? Any help would be most sincerely appreciated!

Cheers!

Freddie

mack

4:21 pm on Feb 3, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



You couch add a field in your mysql database called referral. By default this would be blank because there was no member referral on sign up, but if a user called bob arrives on the sign up page with?referral=joe then Joe can be written to mysql in the referral field of mysql.

Then if you wanted to check on a referral from an admin area for example you might be able to do something like...

select 'referral' from members where member = 'bob'

If you wanted joe to be able to view who he referred you could use something like

select 'member' from 'members' where referral = 'joe'

I'm sure there are a few other ways of doing this. This is just one idea that came to mind.

Mack.

webventures

7:13 pm on Feb 3, 2006 (gmt 0)

10+ Year Member



Hi Mack!

Thanks for taking the time to read my question and for your speedy reply!

Your method sounds logical to me! :-) I will give it a try!

Again, much appreciated!

Cheers!
Freddie