I have this page below, which is the action when you submit a form. I am wondering how you can add a time function to this, to add the time that the form was submitted to my database table in the row "time". I have tried numerous things and can't get them to work :/
<?php
require 'db/connect.php';
if(isset($_POST['submitted']))
{
$player = $_POST['inputWho'];
$offense = $_POST['inputWhat'];
$where = $_POST['inputPlace'];
$proof = $_POST['inputProof'];
$comments = $_POST['inputComments'];
$sqlinsert = "INSERT INTO offenses (player, reason, place, proof, comments) VALUES ('$player', '$offense', '$where', '$proof', '$comments')";
if (!mysqli_query($db, $sqlinsert)) {
die('Error inserting new record.'. "<br />". mysqli_error($db));
} //end of nested if
} //end of if
header("Location: success.php");
?>