G-NEWC Posted September 27, 2008 Report Share Posted September 27, 2008 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 Quote Link to comment Share on other sites More sharing options...
Administrators Nabeel Posted September 27, 2008 Administrators Report Share Posted September 27, 2008 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> Quote Link to comment Share on other sites More sharing options...
G-NEWC Posted September 27, 2008 Author Report Share Posted September 27, 2008 Thanks for the help mate, all sorted now.-JM Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.