summaryrefslogtreecommitdiffstats
path: root/public/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/index.php')
-rw-r--r--public/index.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/public/index.php b/public/index.php
index 2886540..8ca60a6 100644
--- a/public/index.php
+++ b/public/index.php
@@ -2,12 +2,15 @@
////
// atwork/index.php
+
require_once '../system/init.php';
if (!empty($_POST['date']))
{
$format = '%d-%02d-%02d %02d:%02d';
$date = explode('.', $_POST['date']);
+ // First we check if we insert or update
+
$sql = 'INSERT INTO atwork (user, start, finish) VALUES (?, ?, ?)';
$stmt = $db->prepare($sql);