Sharing variables in both actions wp_footer and wp_ajax

Sharing variables in both actions wp_footer and wp_ajax

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