hello,

I have some images in mysql, currently the images aren't resize, and this
displays the image, like: image.php?id=1

But i'd like to resize the image with html tags: e.g. width="300" and
print/echo it.

since Content-type is for image is it even possible? If not then how about
dynamically resizing them such as:
image.php?id=1&width=300   is that possible? If so, please let me know how.

Thanks in advanced.

cheers,
Sebastian

<?php
$conn = mysql_connect("host", "root", "pass") OR DIE (mysql_error());
        @mysql_select_db("images", $conn) OR DIE (mysql_error());

$sql = ("SELECT * FROM images WHERE id = '$_GET[id]'");
$result = mysql_query($sql, $conn);

if (mysql_num_rows ($result ) > 0)
 {
 $row = @mysql_fetch_array($result);
 $image_type = $row['type'];
 $image = $row["image"];
 header ("Content-type: $image_type");
 print $image;
}
?>

Reply via email to