<?php
require 'config.php';

if($_POST['center'])
{
 $center = $_POST['center'];
 $registration_date = $_POST['registration_date'];
 $total = $_POST['total'];
 $male = $_POST['male'];
 $female = $_POST['female'];
 $children_male = $_POST['children_male'];
 $children_female = $_POST['children_female'];
 $unspecified_adults = $_POST['unspecified_adults'];
 $unspecified_children = $_POST['unspecified_children'];
 $unaccompanied_minors = $_POST['unaccompanied_minors'];
 $stmt=$pdo->prepare("insert into mrcs(center,registration_date,total,male,female,children_male,children_female,unspecified_adults,unspecified_children,unaccompanied_minors)values(:center,:registration_date,:total,:male,:female,:children_male,:children_female,:unspecified_adults,:unspecified_children,:unaccompanied_minors)");
 $stmt->bindParam(':center', $center);
 $stmt->bindParam(':registration_date', $registration_date);
 $stmt->bindParam(':total', $total);
 $stmt->bindParam(':male', $male);
 $stmt->bindParam(':female', $female);
 $stmt->bindParam(':children_male', $children_male);
$stmt->bindParam(':children_female', $children_female);
$stmt->bindParam(':unspecified_adults', $unspecified_adults);
$stmt->bindParam(':unspecified_children', $unspecified_children);
 $stmt->bindParam(':unaccompanied_minors', $unaccompanied_minors);
 if ($stmt->execute()) { 
	 echo 1;
     exit;
 }
 else{
	echo 0;
    exit;
 }
}
?>
