<?php
require 'config.php';

if($_POST['id'])
{
 $id = $_POST['id'];
 $country = $_POST['country'];
 $idps = $_POST['idps'];
 $idps_link = $_POST['idps_link'];
 $refugees = $_POST['refugees'];
 $refugees_link = $_POST['refugees_link'];
 $ims = $_POST['ims'];
 $ims_link = $_POST['ims_link'];
 $stmt=$pdo->prepare("update rdh_countries set country=:country, idps=:idps, idps_link=:idps_link, refugees=:refugees, refugees_link=:refugees_link, ims=:ims, ims_link=:ims_link WHERE id=:id");
 $stmt->bindParam(':id', $id);
 $stmt->bindParam(':country', $country);
 $stmt->bindParam(':idps', $idps);
 $stmt->bindParam(':idps_link', $idps_link);
 $stmt->bindParam(':refugees', $refugees);
 $stmt->bindParam(':refugees_link', $refugees_link);
 $stmt->bindParam(':ims', $ims);
 $stmt->bindParam(':ims_link', $ims_link);
 if ($stmt->execute()) { 
	 echo 1;
     exit;
 }
 else{
	echo 0;
    exit;
 }
}
?>
