So i want to insert current time to mysql database, this is my code :
'regis_date'=>$this->input->post(date('Y-m-d H:i:s', now()))
But the result is this : 0000-00-00 00:00:00
What i want is like this (for example) : 2012-08-31 00:00:00
Thanks 😀
$this->input->postis for retrieving data posted through a form.E.g.:
Can be retrieved like this:
Passing a date to
$this->input->postdoesn’t make any sense. What you want is:Or as zerkms rightfully remarks: