I have images stored within a field in my database.
I can extract the image and display it to my web page.
I am having a problem resizing the image which is displayed on the page:
The following code extracts the image from the database:
$sqlquery = "SELECT image FROM tblproductimages WHERE id = $imageid";
$dataresult = mysql_query($sqlquery);
while ($datarow = mysql_fetch_array($dataresult)) {
$productimage= $datarow['image'];
}
// Redirect output of the image to the browser
header('Content-Type: image/jpeg');
print $productimage;
Can anyone tell how I resize an image which comes from a database field please?
Thanks