<commit_before><?php $con=mysqli_connect("127.0.0.1","mss","robot","mss");

$date = date ('H:i:s');

if(isset($_GET['d'])){
$d = $_GET['d'];
$sql = "DELETE FROM `event` WHERE ID=" . $d;
$retval = mysqli_query( $con, $sql );
if(! $retval )
{
  die('Could not delete data: ' . mysql_error());
}
}


if(isset($_POST['m'])){
$match = $_POST['m'];
$time = $_POST['t'];
$r1 = $_POST['R1'];
$r2 = $_POST['R2'];
$r3 = $_POST['R3'];
$b1 = $_POST['B1'];
$b2 = $_POST['B2'];
$b3 = $_POST['B3'];


$sql = "INSERT INTO `event` (`Match`, `time`, `R1`, `R2`, `R3`, `B1`, `B2`, `B3`) VALUES ('" . $match . "', '" . $time . "', '" . $r1 . "', '" . $r2 . "', '" . $r3 . "', '" . $b1 . "', '" . $b2 . "', '" . $b3 . "')";
/*
[Mon Mar 09 00:24:28.587589 2015] [:error] [pid 13777] [client 10.240.169.157:44876]
PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct():
Failed to parse time string (1) at position 0 (1): Unexpected character' in
/home/ubuntu/workspace/project/dash/index.php:19<commit_msg>Misc. DateTime fixes. Full working functionallity<commit_after><?php $con=mysqli_connect("127.0.0.1","mss","robot","mss");

$date = date ('H:i:s');

if(isset($_GET['d'])){
$d = $_GET['d'];
$sql = "DELETE FROM `event` WHERE ID=" . $d;
$retval = mysqli_query( $con, $sql );
if(! $retval )
{
  die('Could not delete data: ' . mysql_error());
}
}


if(isset($_POST['m'])){
$match = $_POST['m'];
$timeraw = $_POST['t'];
$timeraw = $_POST['t'];
$convert = new DateTime($timeraw);
$time = $convert->format('H:i:s');
$r1 = $_POST['R1'];
$r2 = $_POST['R2'];
$r3 = $_POST['R3'];
$b1 = $_POST['B1'];
$b2 = $_POST['B2'];
$b3 = $_POST['B3'];


$sql = "INSERT INTO `event` (`Match`, `time`, `R1`, `R2`, `R3`, `B1`, `B2`, `B3`) VALUES ('" . $match . "', '" . $time . "', '" . $r1 . "', '" . $r2 . "', '" . $r3 . "', '" . $b1 . "', '" . $b2 . "', '" . $b3 . "')";
/*
[Mon Mar 09 00:24:28.587589 2015] [:error] [pid 13777] [client 10.240.169.157:44876]
PHP Fatal error:  Uncaught exception 'Exception' with message 'DateTime::__construct():
Failed to parse time string (1) at position 0 (1): Unexpected character' in
/home/ubuntu/workspace/project/dash/index.php:19
{'fraction_non_alphanumeric': 0.2875635691169672, 'fraction_numerical': 0.06842348589921406, 'mean_word_length': 4.369727047146402, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1840231', 'n_tokens_mistral': 984, 'n_tokens_neox': 904, 'n_words': 205}