Search Results

Search found 1 results on 1 pages for 'user1277467'.

Page 1/1 | 1 

  • send datas to php with ajax - Internal Server Error(500)

    - by user1277467
    i try to send my datas to php with ajax but there's strange mistake. this is my ajax script, function deleteData2() { var artistIds = new Array(); $(".p16 input:checked").each(function(){ artistIds.push($(this).attr('id')); }); $.post('/json/crewonly/deleteDataAjax2', { json: JSON.stringify({'artistIds': artistIds}) }, function(response){ alert(response); }); } i think this works correctly but in php side, i face 500 internal server error(500). public function deleteDataAjax2() { $json = $_POST['json']; $data = json_decode($json); $artistIds = $data['artistIds']; $this->sendJSONResponse($artistIds); } Above code is my php. For example, when i try to send $data to ajax, i print my ids in json mode: However, when i try to send $artistIds to ajax side, i gives 500 error why?

    Read the article

1