manhattanpaul Posted September 11, 2006 Share Posted September 11, 2006 Hi thereI am currently trying to create a new display on the following page - mysite4singles.com/manager/users3.phpI want to be able to see at a glance which members have upgraded.The only problem is, that the members who have upgraded are then repeated under 'Waiting to be registered' and 'Aleady registered' again !Any thoughts (code below)CheersPaul[quote]The pages consists of the following code:[color=purple]<?include ("../config.php");include ("../functii_mail.php"); db_connect($dbserver,$dbuser,$dbpass,$dbname); function get_picture($user_id,$mod=0){//mod daca apare sau nu butonul radio $sql="select nume,id from pictures where user_id=$user_id"; $result=mysql_query($sql); $num=mysql_numrows($result); if ($num<>0) { $i=0; while ($i<$num) { $nume=mysql_result($result,$i,"nume"); $id=mysql_result($result,$i,"id"); ?> <p><img src="../user_pic/ <?=$nume?>"> <? if ($mod==1) { } else { ?> <input type="radio" name="id" value="<?=$id?>"> <br> <?} $i++; } } else { echo "This user have no pictures uploaded !"; }}function last_user($aproved=0){ $sql="SELECT count(*) FROM users where approvved=$aproved "; $result=mysql_query($sql);if($result){ $count=mysql_result($result,0,"count(*)");echo '('.$count.')';} $sql="SELECT id,nick FROM users where approvved=$aproved order by data desc "; $result=mysql_query($sql); $num=mysql_numrows($result); if ($num<>0) { $i=0; while ($i<$num) { $nick=mysql_result($result,$i,"nick"); $id=mysql_result($result,$i,"id"); if ($i==$num-1) { ?> <a href="profile.php?id=<?=$id?>" target="mainFrame"> <?=$nick?> </a> <?is_online($id); } else { ?> <a href="profile.php?id=<?=$id?>" target="mainFrame"> <?=$nick?> </a>, <?is_online($id); } $i++; } } $sql="SELECT id,nick FROM users where upgraded='1' order by data desc "; $result=mysql_query($sql); $num=mysql_numrows($result); if ($num<>0) { $i=0; while ($i<$num) { $nick=mysql_result($result,$i,"nick"); $id=mysql_result($result,$i,"id"); if ($i==$num-1) { ?> <a href="profile.php?id=<?=$id?>" target="mainFrame"> <?=$nick?> </a>, <?is_online($id); } else { ?> <a href="profile.php?id=<?=$id?>" target="mainFrame"> <?=$nick?></a>, </p><?is_online($id); } $i++; } } }echo "Waiting to be registered:";last_user();echo "<br>Already registered:";last_user(1);echo "<br>Upgraded:";last_user(2);[/quote]?>[/color] Link to comment https://forums.phpfreaks.com/topic/20376-can-someone-take-a-look-at-this-to-see-what-the-heck-i-have-done/ Share on other sites More sharing options...
manhattanpaul Posted September 12, 2006 Author Share Posted September 12, 2006 [b][color=red]Any thoughts ??I am really desperate to get this sorted for a friend.RegardsPaul[/color][/b] Link to comment https://forums.phpfreaks.com/topic/20376-can-someone-take-a-look-at-this-to-see-what-the-heck-i-have-done/#findComment-90275 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.