displaying hyperlinks in MySQL query results

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have some code that pulls data from a MySQL db and displays it in a
4-column HTML table.  The headings are:

Port #
Transport
Application
Vendor URL

The first 3 columns return perfectly.  The Vendor URL data, on the other
hand, is returned as text, rather than hyperlinks.  I've tried tweaking the
code several different ways with no success.

The following code is what I started with.  It returns everything I need.
The HTML table is formatted correctly.  I thought I could use a 'hypertext'
datatype in MySQL, but from what I see there isn't any such datatype.  And
I'm so new to PHP I don't know how to isolate the Vendor URL field and
convert the results to links.  Any help would be appreciated.


print "<table><tr><th>Port #</th>";
print "<th>Transport</th><th align=center>Application</th><th
align=center>Vendor URL</th>";

while ($row = mysql_fetch_row($resultID))

{
print "<tr>";
foreach ($row as $field)
{

print "<td align=center>$field</td>";
}
print "</tr>";
}
print "</table>";



Thanks
--rick



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux