OK so I've looked around the web and found this code (from the php net resource site)
// The file
$filename = 'test.jpg';
$percent = 0.5;
// Content type
// Get new dimensions
list($width, $height) = getimagesize($filename);
$new_width = $width * $percent;
$new_height = $height * $percent;
$image_p = imagecreatetruecolor($new_width, $new_height);
$image = imagecreatefromjpeg($filename);
imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
imagejpeg($image_p, null, 100);
Now - if I save the above code in a file called "thumb.php" then upload a large file named 'test.jpg' and then set the source of my image to "www.example.com/thumb.php" FANTASTIC! it works. It saves the large file as a small thumbnail.
How do I incorporate it into the Webassist recordset and repeat region so that images pulled from a database are set into their relevant rows; AND keep their ID so that when a user clicks on the thumb, it opens up the larger file?
I was hoping it would be as simple as
function thumbnail(the above code)
and then <?php echo thumbnail($row_WADAschool['pic']); ?>
But it isn't! I've tried a few variations, but I've reached a real block on this problem and can't see the answer.
Any help would be much received!