how to set beforsend option in wordpress ajax methods

You have two options:

  1. Use jQuery.ajax() instead of jQuery.post()
  2. Use jQuery.ajaxSetup() to change the beforeSend behavior globally.

Reference: https://stackoverflow.com/questions/2257975/using-beforesend-and-complete-with-post

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