Integrate multilevel (mlm) in 1x5 matrix in PHP script

Job ID: 32318960

Budget: $30 – $250 USD

I have a script that I bought in php from a social exchange. This already comes integrated with a single-level referral system, in which one can refer as many people as they want.

What I need is that user 1 can refer to user 2, and user 2 can refer to user 3 and that this user 3 appears as referrals of user 1, because he referred to user 2.

I have a php script of mlm (multilevel), in order not to be developing from 0, and to save efforts, I would like to integrate this script in the php script that I have bought. I leave this in the attachments, along with an image of the current referral system in the other script.
Related categories: PHP JavaScript MySQL HTML Multi Level Marketing