PHP Problem: MLM Hand Levelling Program

MLM Hand Level Programming

 

 

Introduction:

In our modern MLM business policy you have seen that new member always come through one referral and the newly registered member will go the ‘Referral’ bottom line. In this problem we have to figure out the PHP code snippet and the Database design so that we can track everything and we can show the hand level output for each user.

 

Problem:

Suppose ‘A’ is the director of ‘I-Media’. He has now providing the referral product selling system. And one of their programmer have built it but now the programmer is facing the problem about ‘How they can make level wise member through referral system’.

 

Sample Problem:

‘A’ is the first customer of ‘I-Media’. Now through the circulation of ‘I-Media’ now ‘A’ can be able to bring new customer for ‘I-Media’. We can assume that ‘A’ has brought new customer ‘B’.

 

When ‘B’ will register himself in the ‘I-Media’ system then ‘A’ will get 10% commission. Again ‘B’ can be able to bring another new customer ‘C’. So when ‘C’ will register himself in the system then ‘B’ will get 10% commission and the upper level of ‘B’ means ‘A’ will get 5% commission. Again when C will be bring another new customer ‘D’ then ‘C’ will be the upper level of ‘D’. Then after the registration of ‘D’, ‘C’ will get 10% commission, ‘B’ will get 5% and ‘A’ will get 2% commission.

 

We can assume that ‘A’ has again brought new customer ‘B1’. When ‘B1’ will register himself in the ‘I-Media’ system then ‘A’ will get 10% commission. Again ‘B1’ can be able to bring another new customer ‘C1’. So when ‘C1’ will register himself in the system then ‘B1’ will get 10% commission and the upper level of ‘B1’ means ‘A’ will get 5% commission. Again when C1 will be bring another new customer ‘D1’ then ‘C1’ will be the upper level of ‘D1’. Then after the registration of ‘D1’, ‘C1’ will get 10% commission, ‘B1’ will get 5% and ‘A’ will get 2% commission.

 

 

Again,

In the same system also ‘B’ will be able to bring new customer ‘B11’ himself. Then after registration of ‘B11’ ‘B’ will get 10% commission, ‘A’ will get 5% commission. Also ‘B11’ will be able to bring new customer ‘C11’. Then after registering ‘C11’, ‘B11’ will get 10% commission, ‘B’ will get 5% commission, ‘A’ will get 2% commission.

 

The whole system will go through randomly.

 

Visualization:

 

 

 

 

 

 

 

 

 

 

 

 

Please solve this by providing the original PHP script and Database designing.

Shaharia is a professional software engineer with more than 10 years of experience in the relevant fields. Digital ad certified, cloud platform architect, Big data enthusiasts, tech early adopters.