post parameter not being passed zend framework 2 post parameter not being passed zend framework 2 ajax ajax

post parameter not being passed zend framework 2


The issue lies in your JavaScript.

Every time you "blur" on your element, it sets your edited_data variable to an empty array.

edited_data[0] then becomes undefined and will note be posted to your php.

This means that $params['user_bio'] will be an undefined index as user_bio is not being received as a parameter.

To fix this:
Remove $(element).map and replace it with $(element).html();
Also change edited_data[0] to be edited_data as this will not be an array anymore.