[insert_php]
session_start();
include ‘lib/functions.php’;
include ‘config.php’;
include ‘lib/conn.php’;

$airport = mysqli_real_escape_string($conn,strtoupper($_GET[‘airport’]));
/* Connect to Database */
$db = $conn;
if ($db->connect_errno > 0) {
die(‘Unable to connect to database [‘ . $db->connect_error . ‘]’);
}
// Execute SQL query
$sql = “CALL spdGetRunways(‘$cCode’, ‘$airport’)”;
?>


Airport Information

connect_errno > 0) {
die(‘Unable to connect to database [‘ . $db_map->connect_error . ‘]’);
}
$flights_coordinates = array ();
$index = -1;
$sql_map = “CALL spdGetAirport(‘$cCode’, ‘$airport’)”;
if (!$result = $db_map->query($sql_map)) {
die(‘There was an error running the query [‘ . $db_map->error . ‘]’);
}

while ($row = $result->fetch_assoc()) {
$index++;
$flights_coordinates [$index] = array ($row[“latitude_deg”], $row[“longitude_deg”] , $row[“ident”], $row[“airport_name”] ) ;
}
$db->next_result();
?>

Runway Information
query($sql)) {
die(‘There was an error running the query [‘ . $db->error . ‘]’);
}
while ($row = $result->fetch_assoc()) {
?>


Runway Length width
Elevation Threshold Heading
Runway Length Width
Elevation Threshold Heading

next_result();
$sql = “CALL spdGetAirportFreq(‘$cCode’,’$airport’)”;
?>

Airport Frequencies
query($sql)) {
die(‘There was an error running the query [‘ . $db->error . ‘]’);
}
while ($row = $result->fetch_assoc()) {
?>


Type Name Frequency

next_result();
$sql = “CALL spdGetNavaids(‘$cCode’,’$airport’)”;
?>

Airport Navaids
query($sql)) {
die(‘There was an error running the query [‘ . $db->error . ‘]’);
}
while ($row = $result->fetch_assoc()) {
?>


Type Name Frequency

Airport Weather Information & NOTAM

close();
?>

//
[/insert_php]

Fly Yadley