Need Some Code Help Please

I recall being in 5th grade a looong time ago and we had got a computer and everyone was silenced by the newness of such a thing. It was a PET http://computer.yourdictionary.com/pet-computer

This was my bad boy at the time just came out,

http://www.bbc.co.uk/news/technology-10951040

The BBC Computer, yeh right massive 32k of memory

How times change.

Man we need to quit showing our age. lol I am not old but creeping up there quickly

Haha, my first computer was a 486, kinda crazy that my cellphone is much more powerful

A friend of mine brought his sisters Dell ( oh now I feel sick ) over here for me to fix for her and I laughed and he asked me what was that is exactly what I pointed out to him Nabeel. Our phones now are more powerful then that PC he brought here is. He was like yeah I don’t doubt it. I was like yeah there can be no doubt to it. It is hard core fact.

Houston, we have a problem!

Using this code below

<?php

if(count($pireps) > 0)
{
 foreach ($pireps as $pirep)
 {
   $pilotinfo = PilotData::getPilotData($pirep->pilotid);
   $pilotid = PilotData::getPilotCode($pilotinfo->code, $pilotinfo->pilotid);

   if($pirep->accepted == '0') $status = '<font color="#0000ff">PENDING</font>';
   if($pirep->accepted == '1') $status = '<font color="#00ff00">APPROVED</font>';
   else $status = '<font color="#FF0000">REJECTED</font>'; 

   echo '<tr>';
   echo '<td><a href="'.SITE_URL.'/index.php/pireps/viewreport/'.$pirep->pirepid.'">'.$pirep->code.$pirep->flightnum.'</a></td>';
   echo '<td>'.$pirep->depicao.'</td>';
   echo '<td>'.$pirep->arricao.'</td>';
   echo '<td>'.$pirep->flighttime.'</td>';
   echo '<td>'.$pilotid.' '.$pilotinfo->firstname.' '.$pilotinfo->lastname.'</td>';
   echo '<td>'.$status.'</td>';
   echo '</tr>';
 }
}
else
{
   echo '<tr><td>There are no recent flights!</td></tr>';
}
?>

When a PIREP is submitted it should say pending. For one reason or the other, it is being marked as rejected. If I go in to the admin panel and approve it, it gets marked approved. I can not get it to mark a flight as pending.

Thoughts? Concerns? Ideas?

Thanks in advance.

Ray

P.S. This is not all the code that I use for this table. This is just the problem child of it all. I am sure it is simple fix and right under my nose.

Ok I’ll give that a try and see what happens. Thanks!