假设我有一个表格:
<form ... >
<input type="text" name="date" /> //input here is 2013-06-14 09:00:00
</form>
我分配它让说:
$log = new record();
var_dump($log->timein = $_POST['date']); // OUTPUT is string(0) ""
I tried using manual update:
var_dump($log->timein = '2013-06-14 09:00:00'); //string(19) "2013-06-14 06:00:00"
我该怎么做$log->timein
才能获得值 2013-06-14 06:00:00 而不仅仅是空字符串?