From 63822bacd44d964df3596f928f44a56ab5625d4f Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Tue, 13 Apr 2010 13:33:26 +0300 Subject: Better everything --- public/index.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'public/index.php') 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); -- cgit v1.2.3