wordpress ajax always return 0

In function myajax_submit send the headers before echoing any content

header('Content-Type: application/json');
echo json_encode($response);
die();

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)