Returning a value from a PHP page

How can i return a PHP value from a WordPress page to a JQuery
function?

Use wp_localize_script to create an object and pass it to the JavaScript.

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