Posted by Richard Heinz on 05/15/06 21:53
I inserted the code as you stated and I know I can access the image file
becuase if I change the name the get imagesize reports an error message.
The problem I have is it does not display the image but it displays the alt
info.
So what is wrong? It displays a a square with an 'x' and reserves room for
the image.
Dick
"Martin Jay" <martin@spam-free.org.uk> wrote in message
news:mmnFdhEiJKaEFw9z@spam-free.org.uk...
> In message <CP%9g.48253$MM6.35416@bignews3.bellsouth.net>, Richard Heinz
> <richardkheinz@bellsouth.net> writes
>>I have a directory of pictures of individuals and a database with the
>>individual information. One filed or column in the database has the
>>location (directory/filename) of picture. I display the personal
>>information form the database in a table amd now want to display the
>>corresponding picture with the individual information in the table.
>>
>>This is the page with the indiviual info without the pictures.
>>
>>http://sadcma.com/Missions/DistrictMissionary.php
>
> Try inserting the following where you want the picture to be display:
>
>
> <?php
> $image = ; // image location and filename
> $name = ; // name of person
>
> $size=getimagesize($image); // set the dimensions of image
> ?>
>
> <img src="<?php echo $image; ?>" alt="<?php echo $name;?>" <?php echo
> $size[3]; ?>">
>
>
> $image is the directory/filename from your database, and $name is the
> name of the person.
>
> And finally $size=getimagesize($image); returns an array of information
> about the image. $size[3]; should contain it's dimensions in a format
> such as:
>
> width="" height=""
>
> --
> Martin Jay
Navigation:
[Reply to this message]
|