Jump to content

tooltip


andylord

Recommended Posts

Hi, i want add some php into a tooltip that gets data from a database but cannot figure out how to, could someone point me in the right direction please,

 

<?php
var txt1 =   "<?php
// Make a MySQL Connection
mysql_connect("localhost", "blank", "blank") or die(mysql_error());

echo "<br />";

mysql_select_db("blank") or die(mysql_error());

echo "";

// Get all the data from the "example" table 
$data = mysql_query("SELECT * FROM items WHERE  name='Horsemans Wall'")
or die(mysql_error());
echo "<table border='2'bgcolor=#000000 bordercolor=#000099>";
echo "<tr> <th>Image</th> <th>Name</th>  <th>stamina</th> <th>resist</th></tr>";
// keeps getting the next row until there are no more to get
while($row = mysql_fetch_array( $data )) {
// Print out the contents of each row into a table
echo "<tr><td>"; 
echo $row['image'];
	echo "</td><td>"; 
echo $row['name'];
echo "</td><td>"; 
echo $row['stamina'];
echo "</td><td>"; 
echo $row['resist'];
echo "</td><td>"; 

} 

echo "</table>";


?>

this is the code i have to get the info

Link to comment
https://forums.phpfreaks.com/topic/160670-tooltip/
Share on other sites

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.