I would like to display pictures with displaying the actual picture with php.
I found out that it is pretty easy to do this with 1 picture and a copyright watermark, also thumbnails are easily created from a large image.
My question:
Now I have a database(mysql) that contains filenames+paths of all images, now I would like to display 10 thumbnails at a time on each page with using a pagination system.
I'm thinking about displaying the (PHPimages within IFRAMEs, that is not a problem, the problem is:
How do I get an image path+filename (from the database) on my "image.php" file?
Or it maybe impossible..?
---------------------------------------------------------------------
Ofcourse I could just show the images the easy way without php generated images, but the reason that I want to use php generated images is because:
- Make the loading time much faster (smaller file size)
- I can easily use a copyright image without modifying the original images.
Thats why I want to use PHP generated images.
Another question, does this code work for both PHP 4 and 5?
Can anyone help me out?
See the code I use:
This code is to get the image file name + the path from the database:
- Code: Select all
<? echo $row_phqs['location'] ?><? echo $row_phqs['file']; ?>
How do i put that code into this :
- Code: Select all
<?php
$img = imagecreatefromjpeg('How do i get the path of my image source here');
.......................................
?>
Who can
me out?
Or is it impossible the way i want to do this?





