create table - How to allow members to view their personal referrals in php -


i trying create referral list/table in php every member can see referred. 2 columns display are: name , email.

this code counts each members' personal referrals fine. i'm showing see if can branch off or not

<? } }  function middle() { include "config.php"; $id=$_session['username_session']; $rs = mysql_query("select * users username='$id'"); $arr=mysql_fetch_array($rs); $email=$arr[7]; $username=$arr[8]; $password=$arr[9];     $name=$arr[1];   ?>  of today, have <b><font size="3"><? $rs1=mysql_query("select * users ref_by='$username'"); echo mysql_num_rows($rs1);?></b></font> personal referrals.</font> 

this code having trouble in creating table/list of personal referrals per member. said above, code calls members in system not want. want personal referrals per member. maybe code can edited differently work, or use above code make work. im not sure.. help appreciated. thanks

<?  include "./membersrecords.php";  include "./config.php";  $user=$_session['username_session']; $rs2 = mysql_query("select * users username='$user'"); $arr2=mysql_fetch_array($rs2); $email2=$arr[7]; $username2=$arr[8]; $password2=$arr[9];     $name2=$arr[1];  echo("<table border=0 width='100%' cellpadding=0 cellspacing=0>"); echo("<tr><td align=left valign=top><br>");  $sql = "select * users active=1"; $result = mysql_query($sql); $rs3  =  mysql_fetch_row($result); $sql1 = "select * users active=0"; $result1 = mysql_query($sql1); $rs4  =  mysql_fetch_row($result1);  echo("<hr>"); echo("</td></tr><tr>"); echo("<td align=left valign=top>");   $b=$_get[b]; if(!$b) $b=$_post[b]; $p=$_get[p]; $id=$_post[id];  $list="select * users ref_by='$username2' order id"; membersrecords($list,1,$u,$pa,$b,$p);  ?> 


Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -