A
Anonymous
Guest
Hi..
I have done a search database and I have got the results to come back correctly........ I would like to know how I get these results to appear as if in a table.....at the moment they are just appearing as lines of text......
here is my code:
<html>
<style type="text/css">
</style>
<body bgcolor="FF9422">
<a href="javascript:history.go(-1);">Go back to Search</a>
<p><font color="#FFFFFF"><b>The Intermediarys that are in Your Area Are Listed
Below...</b></font></p>
<p> </p>
<p>
<?php
mysql_connect (localhost, whatever, whatever);
mysql_select_db (intermediary);
if ($townorcounty == "")
{$townorcounty = '%';}
if ($county == "")
{$county = '%';}
$result = mysql_query ("SELECT * FROM members
WHERE (town LIKE '$townorcounty%'
OR county LIKE '$townorcounty%')
");
if ($row = mysql_fetch_array($result)) {
do {
print $row["name"];
print (" ");
print $row["town"];
print (" ");
print $row["county"];
print (" ");
print $row["tel"];
print (" ");
print $row["fax"];
print ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
?>
</p>
</body>
</html>
I have done a search database and I have got the results to come back correctly........ I would like to know how I get these results to appear as if in a table.....at the moment they are just appearing as lines of text......
here is my code:
<html>
<style type="text/css">
</style>
<body bgcolor="FF9422">
<a href="javascript:history.go(-1);">Go back to Search</a>
<p><font color="#FFFFFF"><b>The Intermediarys that are in Your Area Are Listed
Below...</b></font></p>
<p> </p>
<p>
<?php
mysql_connect (localhost, whatever, whatever);
mysql_select_db (intermediary);
if ($townorcounty == "")
{$townorcounty = '%';}
if ($county == "")
{$county = '%';}
$result = mysql_query ("SELECT * FROM members
WHERE (town LIKE '$townorcounty%'
OR county LIKE '$townorcounty%')
");
if ($row = mysql_fetch_array($result)) {
do {
print $row["name"];
print (" ");
print $row["town"];
print (" ");
print $row["county"];
print (" ");
print $row["tel"];
print (" ");
print $row["fax"];
print ("<p>");
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
?>
</p>
</body>
</html>