Posted by Martin Jay on 05/15/06 18:46
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]
|