andylord Posted June 2, 2009 Share Posted June 2, 2009 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 More sharing options...
andylord Posted June 2, 2009 Author Share Posted June 2, 2009 can someone help me on this plz ? thanks Link to comment https://forums.phpfreaks.com/topic/160670-tooltip/#findComment-847961 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.