Using this code
<?php
//Generate Dynamic Button with text
header('Content-Type: image/jpeg');
$path="/tmp/buttons";
$text=$_Get['text'];
if ($bytes = @filesize("$path/$text.jpg")){
header ('Content-Length: $bytes');
readfile("$path/$text.png");
}else{
if (!$font):
$font='TIMES.TTF';
Else:
$font=$font.".TTF";
Endif;
if (!$_GET['size']) $_GET['size'] = 12;
$im = ImageCreateFromPNG('button.png');
$tsize=ImageTTFBBox($size, 0 , $font, $text);
$dx=abs($tsize[2]-$tsize[0]);
$dy=abs($tsize[5]-$tsize[3]);
$x= (ImageSx($im)-$dx)/2;
$y=(ImageSy($im)-$dy) / 2 +$dy;
$black=ImageColorAllocate($im,0,0,0);
ImageTTFText($im, $GET['size'], 0, $x, $y, -$black ,$font ,$text);
ImageJpeg($img);
ImageJpeg($im, "$path/$text.jpg");
?>
I can now make nice buttons on the fly and even got it to work in a rollover, but What I cannot seem to figure out is how to make a set of rollover buttons from a MySql result array within DW using this code.....