RoylesVA Posted August 23, 2011 Report Posted August 23, 2011 Hi, i been trying to make my own pilot center but it looks like this i know there is something missing but cant work it out Here is the code i am using what am i missing ? <p><?php echo $title?></p> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table border="1"> <tr> <th>Pilot ID</th> <th>Name</th> <th>Hours</th> <th>Flights</th> <th>Rank</th> </tr> <tr> <td width="14%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a></td> <td><?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><center><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></center></td> <td><center><?php echo $pilot->totalflights?></center></td> <td><center><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></center></td> </table> Any help would be great Nathan Quote
James142 Posted August 23, 2011 Report Posted August 23, 2011 Hi, i been trying to make my own pilot center but it looks like this i know there is something missing but cant work it out Here is the code i am using what am i missing ? <p><?php echo $title?></p> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table border="1"> <tr> <th>Pilot ID</th> <th>Name</th> <th>Hours</th> <th>Flights</th> <th>Rank</th> </tr> <tr> <td width="14%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a></td> <td><?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><center><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></center></td> <td><center><?php echo $pilot->totalflights?></center></td> <td><center><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></center></td> </table> Any help would be great Nathan In this part: <td><center><img src="<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></center></td> you need to edit the src. So instead of just having <?php echo $pilot->rankimage?>, you need to add something like:"http://www.yourwebsi...ur-rank-images/<?php echo $pilot->rankimage?>" eg: <td><center><img src="http://www.yourwebsite.com/path-to-your-images/<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></center></td>[/size][size="2"] obviously change http://www.yourwebsi...ur-rank-images/ to the location of your rank images. Quote
RoylesVA Posted August 23, 2011 Author Report Posted August 23, 2011 Thanks but still not working i changed the code to this <p><?php echo $title?></p> <?php if(!$allpilots) { echo 'There are no pilots!'; return; } ?> <table border="1"> <tr> <th>Pilot ID</th> <th>Name</th> <th>Hours</th> <th>Flights</th> <th>Rank</th> </tr> <tr> <td width="14%" nowrap><a href="<?php echo url('/profile/view/'.$pilot->pilotid);?>"> <?php echo PilotData::GetPilotCode($pilot->code, $pilot->pilotid)?></a></td> <td><?php echo $pilot->firstname.' '.$pilot->lastname?> </td> <td><center><?php echo Util::AddTime($pilot->totalhours, $pilot->transferhours); ?></center></td> <td><center><?php echo $pilot->totalflights?></center></td> <td><center><img src="http://www.royles.eu/lib/images/ranks/<?php echo $pilot->rankimage?>" alt="<?php echo $pilot->rank;?>" /></center></td> </table> Quote
RoylesVA Posted August 23, 2011 Author Report Posted August 23, 2011 aaa got it sorted just on last question how can i make it aline as they are not stright Quote
Jeff Posted August 24, 2011 Report Posted August 24, 2011 Nathan, view my statement I made 2 days ago to another member. View Post 1 Quote
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.