Jump to content

[SOLVED] General qn on displaying info in php


ali_2kool2002

Recommended Posts

Hi

    im kind of new to php and im using macromedia studio, but at the moment im trying to display information

of a standard table containg some brief data. However, the output is not really that good, does anyone know any good

templates i could get for displaying information in a professional or better way than i have below :

 

 

THANKS 4 NE 1 WHO CAN HELP!

 

 

 <?php

echo '<br>';
echo'<p><b>DRIVERS AVAILABLE </b></p>' ;
$query_drivers = "select driverId, driverName, driverSurname,driver_status from driver
where driver_status = 'available'";
$get_drivers_res = mysql_query($query_drivers) or die(mysql_error());
if ($get_drivers_res) {

echo '<table align="center" cellspacing="1" cellpadding="5">
<tr><td align="center"><b>driver Id</b></td>
<td align="center"><b> driver Name</b></td>
<td align="center"><b>  Surname</b></td>
<td align="center"><b> Status</b></td>

</tr>';
while ($results = mysql_fetch_array($get_drivers_res, MYSQL_ASSOC))
{ 

echo '<tr><td align="center">' . $results['driverId'] . '</td><td
align="center">' . $results['driverName'] . '</td><td
align="center">' . $results['driverSurname'] .'</td><td
align="center">' . $results['driver_status'] . '</td>



</tr> ';


}echo '</table>';
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.