12-13-2011, 07:23 AM
|
|
Confirmed User
Industry Role:
Join Date: Feb 2005
Location: Spain
Posts: 2,934
|
Quote:
Originally Posted by Zoxxa
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;
?>
|
thanks, reading up now.
|
|
|