diff --git a/databaseOperations.php b/databaseOperations.php index 3ba9815..f0b391c 100755 --- a/databaseOperations.php +++ b/databaseOperations.php @@ -253,8 +253,8 @@ function addEvent($db, $titre, $localisation, $dtstart, $dtend, $description, $u $request = $db->prepare('INSERT INTO event(event_title, event_localisation, event_dtstart , event_dtend, event_description, event_url, event_urlImage, event_contact) VALUES(:title, :localisation, :dstart, :dtend, :description, :url, :urlImage, :contact)'); $request->execute(array('title'=>$titre, 'localisation'=>$localisation, - 'dtend'=>date("Y-m-d hh:mm:ss",$dtstart), - 'dstart'=>date("Y-m-d hh:mm:ss",$dtend), + 'dtend'=>date("Y-m-d H:i:s",$dtstart), + 'dstart'=>date("Y-m-d H:i:s",$dtend), 'description'=>$description, 'url'=>$url, 'urlImage'=>$urlImage, diff --git a/eventAdded.php b/eventAdded.php index a0edb5c..09d01f7 100644 --- a/eventAdded.php +++ b/eventAdded.php @@ -4,8 +4,8 @@ include('datetimeOperations.php'); $db = connect(); $titre = $_POST['title']; $localisation = $_POST['address']; -$dtstart = $_POST['dtstart']; -$dtend = $_POST['dtend']; +$dtstart = strtotime($_POST['dtstart']); +$dtend = strtotime($_POST['dtend']); $description = $_POST['description']; $url = $_POST['site']; $urlImage = $_POST['urlImage'];