hi
i am trying to retrieve images from a database, which works fine but i want to resize them depending upon a height and width variable stroed in the db, What is the best way of doing this?
I call a script using
<img src="view.php?image_brand=original khaki&image_name=logo">
but if i use teh height and width vairables called from db it will only resize one of the images, if i set variables on above statement.
I asume the best place to do it would be in the view.php script, but not sure the best way to do it
***CODE*****view.php
<?
include 'dbcon.php';
$image_brand = $GET['image_brand'];
$image_name= $GET['image_name'];
$result = mysql_query("SELECT * FROM image WHERE image_brand='$image_brand' AND image_name='$image_name'",$db);
while($numRow = mysql_fetch_array($result))
{
$itype = $numRow['image_type'];
Header("Content-type: $itype");
$image =$numRow['image_data'];
$height=$numRow['image_height'];
$width=$numRow['image_width'];
echo $image;
flush();
}
?>