Hello all !
I'm making a form , With 3 fields: first name, last name, ID
Plus: profile picture
For now all good, searching on the net I learned how to upload an image with ajax
the problem is when i put in When I put these values in my JS code ( for upload image )
PHP Code:
contentType: false,
processData: false,
this part broken , I mean the msg returns blank
PHP Code:
$data['state'] = 'error';
$data['msg'] = validation_errors();
header('Content-type: application/json');
echo json_encode($data);
in mi console whit console.log :
Object {
state: "error",
msg: ""}
Some way to get the message back correctly? I guess the problem is contentType.
I do not know what to do really, help
thanks for reading