Private Label and Cobranded VoIP Solutions
BrainCast internet & phone based message/memo recording & reminder organization system
Internet Phone Service and Broadband Phone Service by ViaTalk

Go Back   VoIP Forums, Internet Phone Service Forums, & Web Hosting Forums > CoderForums - Programming Discussion > General Programming Issues > Programming Languages & Technologies > PHP

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 02-18-2002, 02:22 AM
cactuswings cactuswings is offline
Registered User
 
Join Date: Feb 2002
Location: Arizona
Posts: 1
Php Formatting Help

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"], "&nbsp;&nbsp;&nbsp;&nbsp;",$row["AIRCRAFT"],"&nbsp;&nbsp;&nbsp;&nbsp;",$row["DATE"], "&nbsp;&nbsp;&nbsp;&nbsp;",$row["FLT"], "&nbsp;&nbsp;&nbsp;&nbsp;",$row["CTYPAIR"], "&nbsp;&nbsp;&nbsp;&nbsp;",$row["BASE"], "<p>";

} while($row = mysql_fetch_array($result));

} else {print "Sorry, no records were found!";}

?>

</body>
</html>

Thanks for your help!

Jeremy
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump