Just to build off Fris' code and recommendation.
Code:
<?php
// Only allow integar values
$thumb = preg_replace('/[^0-9]/', '', $_GET['t']) . '.jpg';
// If no thumb set, use default thumb
if(empty($thumb)) {
$thumb = 'default.jpg';
}
// Output thumb
echo $thumb;
?>