I have a form and script which stores the file name of an uploaded image in mysql db. I want to output that image when I query the db and try to output the image all i get are numbers i.e. http://www.mydomain.com/upload/109653475 instead of the image. my column is set as varchar and i have tried text. the image name write fine to the db and uploads fine to the server.
Thanks for the help, Stan S.
If you want to show the image, you'll need the <img> tag, don't you?
Diego
Yes I have it in an img tag but thats is what it outputs. The numbers instead of the image
Stan,
read this tutorial http://www.phpbuilder.com/columns/florian19991014.php3 called storing binary data in a DB.
On page 3 of the tutorial it tells you how to retrieve the image and gives you a sample script that works. I've tried it myself and it works just fine.