I had the same problem a few weeks ago. Here is some code that might help:
echo "<img src='path to/folder/containing/images/$image_name' height=$image_height width=$image_width>";
As sundialsvcs stated, store the image names in the db and the images in a directory on the server. Then all you have to do is read $image_name, $image_height and $image_width from the database and place the above code wherever you want the image(s) to appear.