Search results in custom template

You need to declare the variable as global in resources-search.php:

<?php

global $YearList;

// Rest of file...

May I ask why you’re hardcoding the years, instead of…

$YearList = range( 2000, 2013 );
$YearList = range( 2000, date( 'Y' ) ); // From 2000 to current year

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