You are here: getimagesize function and using variables to display an image « PHP Programming Language « IT news, forums, messages
getimagesize function and using variables to display an image

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация