<?php 
session_start();
include '../../connection.php';
if (isset($_POST['adding_emergency'])) {

	$id = $_SESSION['resident_id'];
	$description = $_POST['description'];
	$latitude = $_POST['latitude'];
	$longitude = $_POST['longitude'];

	$query = "INSERT INTO `tbl_emergency`( `resident_id`, `description`, `lattitude`, `longitude`, `emergency_status`) VALUES ('$id','$description','$latitude','$longitude','Pending')";
	$query_result = $conn->query($query);
}
?>