From 9d5959a709eabc9df1f10dc4342ab24c903fda63 Mon Sep 17 00:00:00 2001 From: AmarOk Date: Thu, 17 Dec 2015 09:44:01 +0100 Subject: [PATCH] addEvent --- databaseOperations.php | 1 + eventAdded.php | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/databaseOperations.php b/databaseOperations.php index cedc9d9..618c50f 100755 --- a/databaseOperations.php +++ b/databaseOperations.php @@ -251,6 +251,7 @@ function addEvent($db, $titre, $localisation, $dtstart, $dtend, $description, $u 'url'=>$url, 'urlImage'=>$urlImage, 'contact'=>$contact)); + echo("debug"); $request->closeCursor(); } catch(PDOException $e) diff --git a/eventAdded.php b/eventAdded.php index a85bf75..a0edb5c 100644 --- a/eventAdded.php +++ b/eventAdded.php @@ -2,14 +2,14 @@ include_once('databaseOperations.php'); include('datetimeOperations.php'); $db = connect(); -$titre = $_POST(['title']); -$localisation = $_POST(['address']); -$dtstart = $_POST(['dtstart']); -$dtend = $_POST(['dtend']); -$description = $_POST(['description']); -$url = $_POST(['site']); -$urlImage = $_POST(['urlImage']); -$contact = $_POST(['contact']); +$titre = $_POST['title']; +$localisation = $_POST['address']; +$dtstart = $_POST['dtstart']; +$dtend = $_POST['dtend']; +$description = $_POST['description']; +$url = $_POST['site']; +$urlImage = $_POST['urlImage']; +$contact = $_POST['contact']; addEvent($db, $titre, $localisation, $dtstart, $dtend, $description, $url, $urlImage, $contact); ?>