Change header.php after ajax call

Your best bet would be to change the body class (either add class or remove class) with jQuery after the ajax call as a callback.

$.ajax({
  url: "yourloop.php",
  context: document.body
}).done(function() { 
  $(this).addClass("finished-loop");
});

http://api.jquery.com/jQuery.ajax/

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