hellow, im creating form with datetimebox easyui, like this :
<input id="dt" name ="po_receive" class="easyui-datetimebox" name="date_time_pick" data-options="required:true,showSeconds:false" style="width:150px">
and i want to save it to mysql with datetime type database, but the result is 0000-00-00 00:00:00. The javascript easyui-datetimebox works perfectly fine.
this is my save data code :
<?php
$po_receive = $_REQUEST['po_receive'];
$sql = "insert into db(po_receive) values ('$po_receive')";
$result = @mysql_query($sql);
if ($result){
echo json_encode(array(
'id' => mysql_insert_id(),
'po_receive' => $po_receive
));
} else {
echo json_encode(array('errorMsg'=>'Some errors occured.'));
}
?>
but the result is 0000-00-00 00:00:00, is that because datetimebox value format is "01/03/2016 07:53:09" ? example datetimebox :datetimebox