Hi All,
Problems with date and time input. I have a form which has a date and a time feild.
The form code for the date is as follows:
<tr>
<td><input name="textfield" type="date" class="bodytext" value="<?php echo date("Y-n-j") ?>"/> </td></tr>
<tr>
<td><input name="rtime" type="text" class="bodytext" value="<?php echo date("h:i:s ", $now) ?>" size="32"></td></tr>
The input statement is :
if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
$insertSQL = sprintf("INSERT INTO rossrun (id, `Month`, date, location, venue, distance, `position`, rtime) VALUES (%s, %s, %s, %s, %s, %s, %s, %s)",
GetSQLValueString($_POST['id'], "int"),
GetSQLValueString($_POST['Month'], "text"),
GetSQLValueString($_POST['date'], "date"),
GetSQLValueString($_POST['location'], "text"),
GetSQLValueString($_POST['venue'], "text"),
GetSQLValueString($_POST['distance'], "text"),
GetSQLValueString($_POST['position'], "text"),
GetSQLValueString($_POST['rtime'], "date"));
When I insert a record the date and time are not recorded, why?. I have played around with all over the weekend with no result.
Can anyone help please.