testing result of $.post with json_encode

If you want to check the value of your JSON response in JS, you need to parse the JSON object you’re returning before trying to access any values:

jsonResponse = JSON.parse(response);
if (jsonResponse.success === true) { /*do something*/ }

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