Hello, I have a PHP/SQL realted question. I am brand new to PHP and managed to get a query on a SQL database to work using PHP. My query returns the results correctly however the results are not formatted correctly. You can go to
http://www.cactuswings.com/actest.htm and just press "submit" to see what i am talking about. I have also placed the PHP code below, maybe that can help you determine what I have done wrong.
<html>
<body>
<body bgcolor="#000080">
<p><font size="1" face="Verdana" color="#FFFF00">
<?php
$dbh=mysql_connect ("localhost", "cactusw_jpi", "<PASSWORD>") or die ('I cannot connect to the database.');
mysql_select_db ("cactusw_ac");
if ($REG == " ")
{$REG = '%';}
$result = mysql_query ("SELECT * FROM ACRZ
WHERE REG LIKE '$REG%'
");
if ($row = mysql_fetch_array($result)) {
do {
echo $row["REG"], " ",$row["AIRCRAFT"]," ",$row["DATE"], " ",$row["FLT"], " ",$row["CTYPAIR"], " ",$row["BASE"], "<p>";
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
?>
</body>
</html>
Thanks for your help!
Jeremy