\n"; $results = pg_query($dbcnx, $query); $row = pg_fetch_row($results); include 'inc_db_connection_close.php'; //echo "allocation_status = " . $row[0] . "\n"; $allocationStatus = $row[0]; //display allocation status. if($allocationStatus == 't') { //complete status. $ph = pg_fetch_row($pageHeadings, 3); echo $ph[0] . "\n"; } else { //incomplete status $ph = pg_fetch_row($pageHeadings, 4); echo $ph[0] . "\n"; } } ?>