Update pagination.php

updating condition  for checking  get parameter value to be not  empty  and not higher than the total number of pages.