Jump to content

Referral System


Highwind RO

Recommended Posts

I'm looking to implement a referral system on my website so that if someone went to www.website.com/2 and signed up it would know that that person was referred to the site by member 2.  Now I have all the register and what not set up and the field to store the referral of number.  So my question is how do I make it so that it doesn't tell me that the page with the /2 on the end of it exists?  I've had this on a few of my other sites that I have had coded for me and it works well.  I know how I could do it by adding a ?member_id= on the end but I honestly feel that the look of that isn't what I want.

 

So down to it, how do I allow someone to type the /2 on the end of the link, make it take them to index.php and be able to capture that number after the "/"?  Any help would be appreciated.  I can elaborate more if need be.  Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/183462-referral-system/
Share on other sites

Using a .htaccess file and mod_rewrite. There is a sub-board on this forum specifically for it where you can probably find some useful information. Alternatively searching Google for mod_rewrite will get you piles of information. I am making some assumptions about your server with this suggestion. If that sounds like what your looking for check out the board and see if you can find what your after. If you need any more help just let me know. I can move this thread to that forum once you've confirmed its what your after.

Link to comment
https://forums.phpfreaks.com/topic/183462-referral-system/#findComment-968434
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.