Thread: Show image

    #1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    8
    Rep Power
    0
    Hi everybody!

    On a page I have an image tag like this:
    <img src="showimage.php?image_id=1">

    What would the "showimage" script (php3) look like if I wanted to show this image?

    Any suggestions please.

    Tom
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 1999
    Location
    London
    Posts
    110
    Rep Power
    0
    try this
    <img src="images/$image_id.gif"> from within php or
    <img src="images/clothes/<? echo $image_id?>.gif"> if not

    ------------------
    cheers


    [This message has been edited by timbo (edited February 04, 2000).]
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    8
    Rep Power
    0
    Hi timbo, thanks for your fast reply.
    However it wasn't what I was looking for.

    Maybe my problem was not properly described.
    But I found the answer to my problem:

    <?

    Header ("Content-type: image/gif");

    if ($image_id == 1)
    {
    $image = "image1.gif";
    }
    else
    {
    $image = "default.gif";
    }

    $view = ImageCreateFromGif ($image);

    ImageGif ($view);
    ImageDestroy($view);

    ?>

    Tom

Similar Threads

  1. Problem with image resizing
    By willms_jay in forum PHP Development
    Replies: 0
    Last Post: February 12th, 2004, 12:23 AM
  2. Replies: 0
    Last Post: January 31st, 2004, 05:05 PM
  3. How to show BLOB image data from PHP
    By celebx in forum PHP Development
    Replies: 1
    Last Post: January 28th, 2004, 02:05 PM
  4. dynamic onchange image preview
    By Sotonin in forum HTML Programming
    Replies: 5
    Last Post: December 30th, 2003, 11:58 AM
  5. Replies: 2
    Last Post: December 20th, 2003, 11:56 AM

IMN logo majestic logo threadwatch logo seochat tools logo