newbie: how to upload images from a form with PHP and mySQL
Posted
by paracaudex
on Stack Overflow
See other posts from Stack Overflow
or by paracaudex
Published on 2010-03-31T00:56:12Z
Indexed on
2010/03/31
1:13 UTC
Read the original article
Hit count: 446
I'm creating a web app (locally, so security doesn't matter) in PHP where the user uploads a set of information and a small .jpeg, which is then inserted into a mySQL table. I can do this no problem with all the text data, but I'm not sure how to cause the image to upload alongside it. I assume I will have to use the blob data type and input type="file", but I fooled around with that a little bit and the solution doesn't seem to be an intuitive extension of how input type="text" works. Do I need to do a lot more PHP scripting to get this to work? Is it possible to upload an image with a form, or is there a necessary intermediate step?
© Stack Overflow or respective owner