I've php file and with this I want both set and get data. (Is it possible?).
This is my php file:
require_once 'GetAreaDB.php';
$latitudeFrom = $_POST['latitudeFrom'];
$longitudeFrom = $_POST['longitudeFrom'];
$maxDistance = $_POST['maxDistance'];
// These three values come from my swift app.
$getArea1 = new GetAreaDB();
$locals = $getArea1->getPositionByCoordinate($latitudeFrom,$longitudeFrom,$maxDistance);
$jsonArray = array();
foreach ($locals as $local) {
$jsonArray1 = array(
"id" => $local->getID(),
"json_local" => $local->getJSON()
);
array_push($jsonArray,$jsonArray1);
}
echo json_encode($jsonArray);
My idea is to create a php file that receives post parameters and then, on the base of these, it get other data. How can I solve?