I got this error instead..
Notice: Undefined index: 1 in c:\inetpub\wwwroot\searchAircraftTailNo.php on line 419,420,421,423,424,425,426
$aircraftTailNo = $row[ '1' ]; <- Line 419
$aircraftType = $row[ '2' ]; <- line 420
$servicingType = $row[ '3' ];
$airFrameHours = $row[ '4' ];
$defectInfo = $row[ '5' ];
$rectifications = $row[ '6' ];
$comments = $row[ '7' ];
$relatedDoc = $row[ '8' ]; <- Line 426
$queryAircraftDisplay = "SELECT DATE_FORMAT(DateOfOccurance, '%D %M %Y') as DateOfOccurance from report where reportID != 0";
if (!empty($_GET['AircraftType']))
{
$queryAircraftDisplay .= " and aircraftType='".$_GET['AircraftType']."' ";
}
if (!empty($_GET['ServicingType']))
{
$queryAircraftDisplay .= " and servicingType='".$_GET['ServicingType']."' ";
}
if (!empty($_GET['AirFrameHours']))
{
$queryAircraftDisplay .= " and AirFrameHours>='".$_GET['AirFrameHours']."' and AirFrameHours <= '".$_GET['AirFrameHours2']."'";
}
if (!empty($_GET['AirFrameHours2']))
{
$queryAircraftDisplay .= " and AirFrameHours>='".$_GET['AirFrameHours']."' and AirFrameHours <= '".$_GET['AirFrameHours2']."'";
}
if (!empty($_GET['YearOfOccurence']))
{
$queryAircraftDisplay .= " and Year(DateOfOccurance) ='".$_GET['YearOfOccurence']."' ";
}
if (!empty($beginDate))
{
$queryAircraftDisplay .= " and DateOfOccurance >= '$beginDate' and DateOfOccurance <= 'endDate'";
}
if (!empty($_GET['Keyword']))
{
$queryAircraftDisplay .= " and reportID in ($newarr)";
}
echo $queryAircraftDisplay;
$resultAircraftDisplay = mysql_query($queryAircraftDisplay) or die ("couldn't execute query ".mysql_error());
while ($row = mysql_fetch_array($resultAircraftDisplay))
{
//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' ];