<?php
// Values received via ajax
$stid = $_POST['stid'];
$ypid= $_POST['ypid'];
$start = $_POST['start'];

// connection to the database
try {
 $bdd = new PDO('mysql:host=localhost;dbname=earmy1;charset=utf8', 'root', '');
 $bdd -> exec("SET CHARACTER SET utf8");
$bdd ->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
} catch(Exception $e) {
exit('Unable to connect to database.');
}

// insert the records
$sql = "INSERT INTO ekteleshyphresivn (stid,ypid,dateofexecution,id) VALUES (:stid,:ypid, :start, '' )";
$q = $bdd->prepare($sql);
$q->execute(array(':stid'=>$stid ,':ypid'=>$ypid , ':start'=>$start));
?>
