Jump to content

Dynamic tooltip with a mysql result.


skatermike21988

Recommended Posts

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???
Link to comment
https://forums.phpfreaks.com/topic/22950-dynamic-tooltip-with-a-mysql-result/
Share on other sites

Would something like this do what you want? [code]<?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 />";
}
?>[/code]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.