niche Posted May 19, 2010 Share Posted May 19, 2010 I inserted this link: <a href="jf3.php"></a> into a mysql database and created a table using PHP. The table was created successfully, but cell that was supposed to contain the link was empty. How do I get this link to show up in my table?Here's the script I used to produce the table: <?phpinclude_once "connect_to_mysql.php";$result = mysql_query("SELECT * FROM clioff") or die(mysql_error()); echo "<table border='4' align='right'>";echo "<tr> <th>Company</th> <th>Item</th> <th>Price</th> </tr>";// keeps getting the next row until there are no more to getwhile($row = mysql_fetch_array( $result )) { // Print out the contents of each row into a table echo "<tr><td>"; echo $row['client']; echo "</td><td>"; echo $row['item']; echo "</td><td>"; echo $row['price']; echo "</td></tr>"; } echo "</table>";?> Thanks for you help. Link to comment Share on other sites More sharing options...
thescientist Posted May 19, 2010 Share Posted May 19, 2010 does it connect to the database alright? Are you checking to make sure your connection and query's return meaningful information to you? Link to comment Share on other sites More sharing options...
justsomeguy Posted May 19, 2010 Share Posted May 19, 2010 I inserted this link: <a href="jf3.php"></a>That link has no text, it's an empty link.. is that why you aren't seeing it? If you view the HTML source of the output do you see it printed? Link to comment Share on other sites More sharing options...
niche Posted May 19, 2010 Author Share Posted May 19, 2010 You're absolutely right (as usual). Thanks to thescientist & justsomeguy. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.