价格:<input type="text" id="good_price" class="txt good_price" name="good_price" value="">
开始时间:<input type="text" id="coupon_start_time" class="txt price date" name="coupon_start_time" value="2013-08-01 10:00"/>后台获取数据并写入数据库:$coupon_start_time = $this->_post('coupon_start_time');
$coupon_price = $this->_post('good_price');
$data['coupon_start_time'] = strtotime($coupon_start_time);
$data['coupon_price'] = $coupon_price;价格正常,但是进入数据库查看数据为0,时间写不进去,但是如果直接写成:$data['coupon_start_time'] = strtotime("now");或者$data['coupon_start_time'] = strtotime(date("Y-m-d H"));就可以正常写入. 最佳答案