Thanks for the reply, vaaaska..
I did as you suggested..
However, It returned a parse error statement - Parse error: parse error in c:\inetpub\wwwroot\searchAircraftTailNo2.php on line 99
Line 99 - if ($_GET['AircraftType']))
<?php
if ($POST['ServicingType'] != '') {
$pulldownServicingType = " AND ServicingType LIKE '%$POST[ServicingType]%' ";
} else {
$pulldownServicingType = '';
}
?>
<?php
if ($GET['AircraftType']))
{
echo "Search results for: <b>" .$GET['AircraftType']. "</b><br>";
//end highlight
$cntr = 1 ; //counter for the table columns
echo "<table width=90% align=center border=1><tr>
<td align=center bgcolor=#00FFFF>AirCraft Tail No.</td>
<td align=center bgcolor=#00FFFF>AirCraft Type</td>
<td align=center bgcolor=#00FFFF>Servicing Type</td>
<td align=center bgcolor=#00FFFF>Airframe Hours</td>
<td align=center bgcolor=#00FFFF>Defect Info</td>
<td align=center bgcolor=#00FFFF>Rectifications</td>
<td align=center bgcolor=#00FFFF>Comments</td>
<td align=center bgcolor=#00FFFF>Related Documents</td>
</tr><tr>";
$queryAircraftTypeDisplay = "SELECT * from report where AircraftType='".$_GET['AircraftType']."' $pulldownServicingType";
//echo $queryAircraftTypeDisplay;
$resultAircraftTypeDisplay = mysql_query($queryAircraftTypeDisplay) or die ("couldn't execute query ".mysql_error());
while ($row = mysql_fetch_array($resultAircraftTypeDisplay))
{
//now let's make the keywords bold. To do that we will use preg_replace function.
//Replace field
$aircraftTailNo = $row[ '1' ] ;
$aircraftType = $row[ '2' ] ;
$servicingType = $row[ '3' ] ;
$airFrameHours = $row[ '4' ] ;
$defectInfo = $row[ '5' ] ;
$rectifications = $row[ '6' ] ;
$comments = $row[ '7' ] ;
$relatedDoc = $row[ '8' ] ;
//if there are 7 cols, write the <tr> tag and reset the counter
if ($cntr == 2)
{
echo "</tr><tr>";
$cntr =1;
}
echo "
<td>$aircraftTailNo </td>
<td>$aircraftType </td>
<td>$servicingType </td>
<td>$airFrameHours </td>
<td>$defectInfo </td>
<td>$rectifications </td>
<td>$comments </td>
<td>$relatedDoc </td>
";
$cntr++; //increment the counter
}//end while
echo "</tr></table>";
}
?>