Jump to content

PHP LOGIC HELP PLEASE


dsbpac

Recommended Posts

I just need some help with login in order to wrap my head around how to code this. I have a site that is going to sell a product. Each sale is going to be logged into an db with all the normal info(user, sale id number so on). My question is this... I'm trying to create a 10 level commission system. Any idea's and logic that you would use to create this would be much appriciated. Thanks in advance.

Link to comment
https://forums.phpfreaks.com/topic/280013-php-logic-help-please/
Share on other sites

Okay let me take a step back. Lets start with a 3 tier referral system to keep it simple and so I can gather the logic and build from there.

So you have someone that signs up named james. James gets his buddy mike to sign up and mike gets his buddy steve to sign up.

 

So so far we have

level 1 (20% commision) James

level 2 (10% commision) mike, michelle

level 3 (5% commision) steve(mike referral), stacy(mike referral), sarah(michelle referral), sean(michelle referral)

 

The first level is pretty simple since everything is a direct referral. How would I go about doing the second and third levels? I know it's some type of query but I would think you need to make each level into an array. Since I plan to expand this more levels I will need it to ++ count as well correct? Any help and example to get me started would be greatly appriciated

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.