|
Posted by ctclibby on 06/06/06 23:40
MS wrote:
[snip]
> straightforward code to show me how to do this? Is there a better way
> that is not too complicated? Remember, I am a newbie.
Straightforward? Boy, am not sure if you want to display this image
inline or as an image src...
For inline, you need to open the image file:
$Image = imagecreatefromjpeg($ImageName.jpg)
..... do stuff with the image here if you wish...
header("content-type: image/jpeg")
imagejpeg($Image)
?>
Image already exists as a .jpg on disk NOT in a database, create a link
to it.
$Query = "select DirFilePath from FileDatabase where
imagename='ImageName.jpg'";
$db = $chk->query($Query);
.....db error glue stuff here.
$info = $chk->fetchrow();
for ease of use, combine your DirFilePath with ImageName.jpg
( /usr/local/images/imagename.jpg ) or something like that.
<img src="/usr/local/images/imagename.jpg">
..... more html/php code here.
your results may vary!
Navigation:
[Reply to this message]
|