PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Whoa! Are you storing the image data in the database as well? By image data I mean are you reading in the JPG and storing the actual pixel-by-pixel information in the DB? If so, ~bdlang was correct. Do a Google search about storing images in a database. One of your search results should have everything you need to know.
Don't use a varchar - it's not nearly big enough. Use a blob (for small images) or mediumblob (for medium sized images).
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Hmm. I definitely thought based on the initial post (edited?) that the images were stored in the database. Maybe it was too early for PHP questions.... Only problem is, I'm still confused, and that can't be good.
Did you do a Google search? You can't just echo that data, you have to use a PHP file to dump the jpg headers & then the image data - essentially mimicing a JPG file.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.