Jump to content


Photo

Dynamic tooltip with a mysql result.


  • Please log in to reply
3 replies to this topic

#1 skatermike21988

skatermike21988
  • Members
  • PipPipPip
  • Advanced Member
  • 100 posts
  • LocationFlorida

Posted 04 October 2006 - 05:09 AM

Ok, i have a mysql query with a loop, and with what is displayed i am wanting a dynamic tooltip to be displayed, well i can get the tooltip to display but for every thing that is displayed from the query i am only getting the first to be pulled. for example:


say first to be shown is a user by the name of rickie: tooltip shows: Name: Rickie Something etc...

second to be shown is say billy joe: tooltip shows: Name: Rickie Something etc...

get what i am saying???

#2 Daniel0

Daniel0
  • Staff Alumni
  • Advanced Member
  • 11,956 posts

Posted 04 October 2006 - 05:34 AM

Would something like this do what you want?
<?php
$result = mysql_query("SELECT * FROM users");
while($user = mysql_fetch_assoc($result)
{
	echo "<a href='index.php?profile={$user['id']}' title='{$user['real_name']}'>{$user['username']}</a><br />";
}
?>


#3 skatermike21988

skatermike21988
  • Members
  • PipPipPip
  • Advanced Member
  • 100 posts
  • LocationFlorida

Posted 04 October 2006 - 05:54 AM

well what i am wanting is to show a list of things, like a users rank, how many photo's they have etc.

#4 skatermike21988

skatermike21988
  • Members
  • PipPipPip
  • Advanced Member
  • 100 posts
  • LocationFlorida

Posted 04 October 2006 - 09:24 AM

any ideas???




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users