<?php

require_once('../BDD/SqliteDb.php');
require_once('../controleur/Controleur.php');
$db = new SqliteDb('o');



$debut =str_replace('-', '', $_GET['debut']) ;
$fin =str_replace('-', '', $_GET['fin']) ;

$q = "UPDATE dateTp SET dateDebut=? WHERE numtp=?";
$prp=$db->prepare($q);      
$prp->bindParam(1, $debut );
$prp->bindParam(2, $_GET['tp']);
$result = $prp->execute();

$q = "UPDATE dateTp SET dateFin=? WHERE numtp=?";
$prp=$db->prepare($q);      
$prp->bindParam(1,  $fin);
$prp->bindParam(2,$_GET['tp'] );
$result = $prp->execute();

echo '<strong> Les dates ont été modifiées </strong>';


