Here's the code that inserts everything from the original form:
PHP Code:
<?php
mysql_connect("localhost", "timeclock", "t1m3cl0ck") or die(mysql_error()); mysql_select_db("timeclock") or die(mysql_error());
$now = date("h:i:s a");
$today = date("Y-m-d");
$uid = $_POST['uid'];
$tru = date("Y-m-d H:i:s");
$insert = "INSERT INTO data (uid, date, time, trutime, reason) VALUES ('$uid','$today', '$now', '$tru', '".$_POST['reason']."')";
if (!mysql_query($insert))
{
die('Error: ' . mysql_error());
}
header('Location: login.php');
?>
Bookmarks