Welcome Guest, Not a member yet? Register   Sign In
DATE FIELD INSERTION THROUGH AR NOT WORKING
#1

[eluser]Unknown[/eluser]
I have written following code to get the date value from a form having date text box having id and name 'datepicker'. But it does not insert the InvDate properly in MySQL. It just inserts 0000-00-00 in my mysql backend. Kindly suggest based upon my following code.

Codes:-
$this->load->database();
$data= array(
'InvId' => $_POST['InvId'] ,
'InvTyp' => 'S' ,
'InvDate' => $_POST['datepicker']
);
$this->db->insert('tmpinvoice', $data);
#2

[eluser]Stefan Hueg[/eluser]
First of all hello Captain Capslock,
secondly put your code into the [ code ] tags
and last but not least: What does the following line in your controller tell

Code:
var_dump($_POST['datepicker']);

...and use $this->input->post(...) for your own security Wink




Theme © iAndrew 2016 - Forum software by © MyBB