2 if (!isset($_POST['oid'])) {
3 header('Location: index.php');
7 #include <infocon.style>
9 <page func=InfoCon title="Stempeluhr">
12 function hour2min($hour)
14 $parts = explode(':', $hour);
16 return $parts[0]*60 + $parts[1];
19 $dbh = pg_pconnect ("<dbhost>", "<dbport>", "<dbname>")
20 or die("Unable to connect to SQL server");
23 $query = sprintf("UPDATE stempel SET time=%d, task='%s' WHERE oid = %s",
24 hour2min($_POST['time']),
25 pg_escape_string($dbh, $_POST['task']),
28 $sth = pg_exec ($dbh, $query);
31 <p><strong>Updated.</strong></p>
33 <p>Return to <a href="index.php">Index</a></p>