<?php
require('../config/connection.php');
if (isset($_POST["id"])) {
	$output = array();
	$query = "SELECT * FROM profile_mst WHERE id =" . $_POST["id"] . "";
	if (mysqli_query($con, $query)) {
		$result = mysqli_query($con, $query);
		while ($row = mysqli_fetch_array($result)) {
			$output['pilgrim_name'] = $row["pilgrim_name"];
			$output['age'] = $row["age"];
			$output['gender'] = $row["gender"];
			$output['email'] = $row["email"];
			$output['mobile_number'] = $row["mobile_number"];
			$output['aadhaar_number'] = $row["aadhaar_number"];
			$output['place'] = $row["place"];
			$output['id'] = $row["id"];
		}
		echo json_encode($output);
	}
}
