|
Posted by Voodoo Jai on 11/11/07 23:11
I have a dbn of images that I retrieve using SQL statements in
dreamweaver.
I want to get the file name using SQL and then place it into the
"getimagesize" function and then use this info (FileName, Width,
Height) to display the image on my web page.
something like this
<td width="620" valign="top">
<?php
//Assign 2 variables the Files name from the db and the file type
$type = 1;
$FileName = $row_TestDisplay['menu'];
list($width, $height, $type) = getimagesize($FileName);
?>
<div style="overflow: auto; width: 610px; height: 600px">
<img src="FileName" width="<?PHP $width ?>" height="<?PHP $height ?
>">
</div>
</td>
I can only get this to work using the height and width attributes in
the img tag, how can I do this.
Many thanks in advance
Voodoo Jai
Navigation:
[Reply to this message]
|