Hi guys I have problem with updating my database.
I'm using Codeigniter 3.0
When I copy sample code from doc everything works:
PHP Code:
$data = array(
'title' => 'My title',
'name' => 'My Name',
'date' => 'My date'
);
$sql = $this->db->insert('mytable', $data);
echo $sql;
But when I'm trying send my array:
PHP Code:
Array(
[id_store] => 78
[id_campaigns] => 42
[cause] => 1
[name] => sd
[weight] => 45345
[contact] => sdfsd
[phone] => fsdf
[contacted] => 1
[added] => 2015-05-21 18:24:03
)
I always get blank page and Invalid HTTP status code 500
The page is in AngularJS, I geting data from form in JSON format
I my controller I have:
PHP Code:
// JSON
$post = file_get_contents('php://input');
$_POST = json_decode( $post , true );
What I'm doing wrong?