This is more a question of logic than anything. I am wanting to make sure I am handling this in a secure way.
When the user clicks a link it passes the year in the URL. (e.g. page.php?year=2010) It uses that year to query the database table "year" column and then display that rows information.
I am securing it like so:
I load that tables year column into an array, and make sure the year in the url exists in the table. If it doesn't, then it throws a not found error, if it does find the year to be in the array, it then continues and displays the data.
Is there a better/more secure way of handling this, or is this sufficient?