user additional info
Started on the old forum in May 2010 · view the original in the archive · old links redirect here
Your wording of your question isnt very clear. however I think you want a star to show next to the persons name if they have filled in additional profile details so something like this:
$info = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_xinfo WHERE uid='".$who."'"));
if($info[0]>0){
echo "joker*";
}else{
echo "joker";
}
not work
I tried to put like you say but don`t work
//changable sql
if($view=="name")
{
$sql = "SELECT id, name, regdate FROM ibwf_users ORDER BY name LIMIT $limit_start, $items_per_page";
}else{
$sql = "SELECT id, name, regdate FROM ibwf_users ORDER BY regdate DESC LIMIT $limit_start, $items_per_page";
}
$items = mysql_query($sql);
if(mysql_num_rows($items)>0)
{
while ($item = mysql_fetch_array($items))
{
$info = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_xinfo WHERE uid='".$$item."'"));
if($info[0]>0){
echo "$item*";
}else{
echo "$item";
}
$jdt = date("d-m-y", $item[2]);
$lnk = "<a href=\"index.php?action=viewuser&who=$item[0]&sid=$sid\">$item[1]</a> <small>Joined: $jdt</small>";
echo "$lnk<br/>";
Oh you want it on lists.php ... i was coding it for index.php
you nearly got it right ...u just forgot to add which part of the array you were calling so just change lines:
$info = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_xinfo WHERE uid='".$$item."'"));
if($info[0]>0){
echo "$item*";
}else{
echo "$item";
}
to
$info = mysql_fetch_array(mysql_query("SELECT id FROM ibwf_xinfo WHERE uid='".$item[0]."'"));
if($info[0]>0){
echo "$item[1]*";
}else{
echo "$item[1]";
}