AJAX / Post / delete record not working |
Still having some problems with AJAX crud. For delete, I have the following controller;
PHP Code: public function task_delete(){ It takes in an $id from $_POST data to delete the specified task. I always get returned 'success' '= 0, msg' => "No Task To Delete". Strangely, I get NULL is my log file for var_dump($_POST) The ajax request is as follows; Code: $(document).on('click', '.delete-task', function(event){ The URL is correct as my log is written to. For type, I have tried 'POST' and 'post' For id, this gets passed in the network window, id=103 where 103 is the row I clicked on. The alert returns success = 0 and 'success' '= 0, msg' => "No Task To Delete". I am stumped as to what the problem is. Any pointers appreciated. |
Welcome Guest, Not a member yet? Register Sign In |