Jump to content

Editing Pilots Roster table Design


Recommended Posts

Posted

As you can see,] http://www.linkvirtual.info/index.php/pilots ] list doesnt look too good with my CSS, so was looking to change the design but got stuck on the php side of things, and as i edited the $report functions how i thought would work, it didnt turn out and all i got was errors :/I basically want to use the same style table as what i used on the front page for the recently filed Pilot Reports [ http://www.linkvirtual.info ] , but just have it on the pilots list page instead.Here is the code for the reports;<center><h2>Recent Arrivals</h2><?phpif(!$reports){ echo 'No reports have been filed';return;}foreach($reports as $report){echo "<table border="0.2" width="60%"><tr> <td align="center"><b>Fl. Number</b></td> <td align="center"><b>Pilot Name</b></td> <td align="center"><b>From</b></td> <td align="center"><b>To</b></td> <td align="center"><b>Aircraft</b></td> <td align="center"><b>Status</b></td></tr><tr> <td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->code $report->flightnum </td> <td bgcolor=#EBEEEF width=10% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->firstname $report->lastname</td> <td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->depicao</td> <td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->arricao</td> <td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->aircraft</td> <td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>Landed</td></tr></table>";}?></center>----So, any advice on what to change or edit for the table to contain the Pilots Roster would be much appreciated.Thanks alot in advance,James

  • Administrators
Posted

What are the error?First the table headers should be out of the loop:

<center><h2>Recent Arrivals</h2><?phpif(!$reports){echo 'No reports have been filed';return;}echo "<table border="0.2" width="60%"><tr><td align="center"><b>Fl. Number</b></td><td align="center"><b>Pilot Name</b></td><td align="center"><b>From</b></td><td align="center"><b>To</b></td><td align="center"><b>Aircraft</b></td><td align="center"><b>Status</b></td></tr>";foreach($reports as $report){echo "<tr><td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->code $report->flightnum </td><td bgcolor=#EBEEEF width=10% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->firstname $report->lastname</td><td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->depicao</td><td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->arricao</td><td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>$report->aircraft</td><td bgcolor=#EBEEEF width=5% height=5 align=left><font face=Verdana color=#7E7E7E size=1<td>Landed</td></tr>";}echo '</table>';?></center>

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...