Hello -
i have a page that displays data from mysql:
<?
mysql_connect("$dbServer","$dbUser","$dbPass") or die("Unable to connect to SQL server");
@mysql_select_db("$dbName") or die("Unable to select database");
$result = mysql_query("select `FirstName`,`LastName`,`Address`,`City`,`State`,`ZIP`,`HomePhone`,`CellPhone`,`WorkPhone`,`Email` from contact ORDER BY `contact`.`LastName` ASC");
?>
<p align="center" class="large">Member Roster</p>
<table border="1" width="100%">
<tr>
<?
while ($field=mysql_fetch_field($result)) {
echo "<th>";
echo "$field->name";
echo "</th>";
}
echo "</tr>";
while ($row = mysql_fetch_row($result)) {
echo "<tr>";
for ($i=0; $i<mysql_num_fields($result); $i++) {
echo "<td>";
echo "$row[$i]";
echo "</td>";
}
echo "</tr>\n";
}
echo "</table>";
?>
it works fine, however I'd like the results in the 'Email' field to be a clickable mailto: link and can't seem to figure out how to get it done.
Any help is greatly appreciated!