Definately don't store it in the database. Store the location to it on the local filesystem, then [man]readfile/man it out.
Anyways, you're most likely serving the image as [FONT=courier new]text/html[/FONT], when you need something like [FONT=courier new]image/jpeg[/FONT]. Make sure to change "jpeg" to whatever image format you're using, like "png" or "gif."
You'll need a line like the following:
header('Content-type: image/jpeg');