我一直试图让我的电子邮件和 URL 显示为带有 href 和 mailto 的超链接,但没有成功。有人可以看看下面的代码,让我知道我需要做什么吗?谢谢。
<?php
mysql_connect ("localhost", "root", "") or die (mysql_error());
mysql_select_db ("store_location");
$term = $_POST['term'];
$sql = mysql_query("SELECT *
FROM store_location
WHERE store_name like '%$term%'
OR address like '%$term%'
OR city like '%$term%'
OR state like '%$term%'
OR zip like '%$term%'
OR phone like '%$term%'
OR fax like '%$term%'
OR email like '%$term%'
OR url like '%$term%' ");
while ($row = mysql_fetch_array($sql)){
echo '<h1>Search Results:</h1>';
echo 'Store Name: '.$row['store_name'];
echo '<br/> Address: '.$row['address'];
echo '<br/> City: '.$row['city'];
echo '<br/> State: '.$row['state'];
echo '<br/> Zip: '.$row['zip'];
echo '<br/> Phone: '.$row['phone'];
echo '<br/> Fax: '.$row['fax'];
echo '<br/> Email: '.$row['email'];
echo '<br/> URL: '.$row['url'];
echo '<br/><br/>';
}
?>