Yonder
30-11-2009, 02:25 AM
So im sure im missing something, i have done GD before and i have referred to my previous work but im just missing something im sure of it!
<?PHP
$default_style = '1';
$style = $_GET["style"];
$style = ($style == '') ? $default_style : $style;
$file = 'images/$style.png';
$im = imagecreatefrompng($file);
$white = imagecolorallocate ($im, 255, 255, 255);
$font_file = 'Volter.ttf';
imagefttext($im, 20, 0, 505, 130, $white, $font_file, "HI");
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
?>
Basically it works fine except i cannot choose a style it just sticks with the default one!
<?PHP
$default_style = '1';
$style = $_GET["style"];
$style = ($style == '') ? $default_style : $style;
$file = 'images/$style.png';
$im = imagecreatefrompng($file);
$white = imagecolorallocate ($im, 255, 255, 255);
$font_file = 'Volter.ttf';
imagefttext($im, 20, 0, 505, 130, $white, $font_file, "HI");
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
?>
Basically it works fine except i cannot choose a style it just sticks with the default one!