cwkeng09 0 Newbie Poster

How to add Lv2 and Lv3 referral to database?
for example:
D is new register and downline for C,
C is downline for B,
B is downline for A.

I want the A, B and C add into the database like
upline upline2 upline3
C B A


below is my code for 1 upline.

function new_user($uname,$pword,$email,$uline=false,$country,$connection)
{
$uline = ($uline) ? $uline : "";
if(mysql_query("INSERT INTO `users` (
`userid` ,
`username` ,
`password` ,
`email` ,
`country` ,
`upline`
)
VALUES (NULL , '{$uname}', '{$pword}', '{$email}', '{$email}', '$country', '$uline');",$connection))


any one please help to modify to add the upline2 and upline3 into database. Sorry for my bad english ...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.