user additional info

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

5 replies · 456 views · started 16 years ago · 1 min read

2 participants
joker12 Junior · 12 posts #1

Hi there,

How can I make if the user update the additional info to see on nick (on lavalair). exemple :

user normal : joker user update addtion info : joker*

Thanks

something else Fellow · 2,296 posts #2

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";
}
joker12 Junior · 12 posts #3

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/>";
something else Fellow · 2,296 posts #4

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]"; 
}  
joker12 Junior · 12 posts #5

thx something else for help😍

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close