Help with showing text when something is entered in my search bar

You can do that using jQuery’s focus function. add following into your php file inside <script> tags.

$("#your-searchinput-id").focus(function() {
    $("h4.title_sidebarsub").text("<?php echo $string ?>")
});
$(this).blur(function() {
    $("h4.title_sidebarsub").text("mijn gemeente")
});

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