Layout not looking right
Moderator: General Moderators
Layout not looking right
Well i have PHP reading the database fine, its just the appearance im not happy with, i would like to be able to <center> the text, and font size arial 1 .. the page in question is at:
http://www.kunzair.com/searchform.php?p ... ael+Driggs
the code is:
<html>
<body>
<?php
mysql_connect (localhost, kunzair_Michael, poster1);
mysql_select_db (kunzair_pirep);
include("header.php");
if ($pilotid == "")
{$pilotid = '%';}
$result = mysql_query ("SELECT * FROM pirep WHERE pilotid LIKE '$pilotid%'");
if ($row = mysql_fetch_array($result)) {
print "<CENTER>";
print "
<table>
<TD>{$row['pilotid']}</TD>\n";
print "<br><br>";
print "<TABLE BORDER=\"0\">\n";
print "<TR>\n<TD><b>PilotID_________________</b></TD>\n";
print "<hr>";
print "<TD><b>Departure___</b></TD>\n";
print "<TD><b>Destination__</b></TD>\n";
print "<TD><b>Hours__</b></TD>\n";
print "<TD><b>Route</b></TD>\n</TR>\n";
do {
print "<TR>\n";
print "<TD>{$row['pilotid']}</TD>\n";
print "<TD>{$row['departure']}</TD>\n";
print "<TD>{$row['destination']}</TD>\n";
print "<TD>{$row['hours']}</TD>\n";
print "<TD>{$row['route']}</TD>\n";
print "</TR>\n";
} while($row = mysql_fetch_array($result));
print "</TABLE>\n</CENTER\n";
print "<center>";
print "<br><br>";
print "<br><br>";
} else {print "<center>You need to enter a PIREP first!</center>";}
print "<BR>\n";
include("footer2.php");
?>
</body>
the page i would like it to look like is:
http://www.kunzair.com/kva101.htm
is that possible??!!??
Michael
http://www.kunzair.com/searchform.php?p ... ael+Driggs
the code is:
<html>
<body>
<?php
mysql_connect (localhost, kunzair_Michael, poster1);
mysql_select_db (kunzair_pirep);
include("header.php");
if ($pilotid == "")
{$pilotid = '%';}
$result = mysql_query ("SELECT * FROM pirep WHERE pilotid LIKE '$pilotid%'");
if ($row = mysql_fetch_array($result)) {
print "<CENTER>";
print "
<table>
<TD>{$row['pilotid']}</TD>\n";
print "<br><br>";
print "<TABLE BORDER=\"0\">\n";
print "<TR>\n<TD><b>PilotID_________________</b></TD>\n";
print "<hr>";
print "<TD><b>Departure___</b></TD>\n";
print "<TD><b>Destination__</b></TD>\n";
print "<TD><b>Hours__</b></TD>\n";
print "<TD><b>Route</b></TD>\n</TR>\n";
do {
print "<TR>\n";
print "<TD>{$row['pilotid']}</TD>\n";
print "<TD>{$row['departure']}</TD>\n";
print "<TD>{$row['destination']}</TD>\n";
print "<TD>{$row['hours']}</TD>\n";
print "<TD>{$row['route']}</TD>\n";
print "</TR>\n";
} while($row = mysql_fetch_array($result));
print "</TABLE>\n</CENTER\n";
print "<center>";
print "<br><br>";
print "<br><br>";
} else {print "<center>You need to enter a PIREP first!</center>";}
print "<BR>\n";
include("footer2.php");
?>
</body>
the page i would like it to look like is:
http://www.kunzair.com/kva101.htm
is that possible??!!??
Michael
The sql data
The Data being pulled off the database, it is writing to the page fine, but i think it looks sloppy, if you take a look at the first link below, it will show you what i am getting, the second link is what i would like to have the page look like. basically, the text size, and font, in a php querry.
the code is in the first post still. hope that clears that up?
Michael
now:
http://www.kunzair.com/searchform.php?p ... ael+Driggs
what i would like aperance wise:
http://www.kunzair.com/kva101.htm
thanks
the code is in the first post still. hope that clears that up?
Michael
now:
http://www.kunzair.com/searchform.php?p ... ael+Driggs
what i would like aperance wise:
http://www.kunzair.com/kva101.htm
thanks
- protokol
- Forum Contributor
- Posts: 353
- Joined: Fri Jun 21, 2002 7:00 pm
- Location: Cleveland, OH
- Contact:
Think of all the data you are displaying as just plain text. Don't worry about the fact that it is dynamically displayed. If you have a pilot who you are displaying info for, then print the formatting (tables in your case) just as you would do in HTML. Create a stylesheet and then include the class's or id's in your HTML.
CSS Tutorial
CSS Tutorial
im sorry i just dont get that, ive been reading for two weeks, and cant find anything on text size, in php array
i still am learning <G> duh, and i sure apreciate your help, i did get the text centered, just would like to know anyway to change the text size, per LINE...such as the <TR> or <TD> tags?
i still am learning <G> duh, and i sure apreciate your help, i did get the text centered, just would like to know anyway to change the text size, per LINE...such as the <TR> or <TD> tags?
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
<css advocacy>The problem with <font> tags is you end up with hundreds of them bloating your page. If you really want more control over which fonts are used and what they should look like, try CSS like protokol said. It really makes a difference to page size and by using it you can change all your text to Verdana without having to worry about every little font tag.</css advocacy>
Mac
Mac
