php image upload & Mysql
- Started
- Last post
- 5 Responses
- georgietexan
Came into a problem last night working on a website for a buddy. He would to upload photos plus some text about each photo to his server. I build this little script to upload the images to a folder, and works great. Problem is that when I try to use that same form to load data into a MYSQL it doesn't. I could make two forms on two different pages but I would like to have it all in one. Anyone else come across this issue?
- lostnation0
you're gonna have to show some code. you might try searching the archives as well.
off the bat, i would make sure you have this attribute in your tag:
enctype="multipart/form-data"
- ToxicDesign0
Don't quote me , but if you want to input a picture (after it has been uploaded to the server) you wil need to input it into a BLOB field as a binary object.
Make sense?!!?
I would take a look over at http://www/phpbuilder.com for some script help.
I would be easier to have the pictures saved in some directory and then insert its path/link into the DBase - that's was I do. Over and out.
- georgietexan0
ToxicDesign, Yes I hear ya I'm having a bit of trouble here though. I can load the images into a dir just fine. it's when I trying to also insert text into mysql in the same form I hit a block. I'm looking on the web now for some help but all I get are
http://www.sitepoint.com/article…which is great but I don't want to use the e.g. the Graphics Development (GD) Library, ImageMagick or NetPbm,
i want my own thumb nails
- err0
How is the PHP script uploading to a folder? Where is your buddy uploading his pictures? I did something like this but I used seperate scripts to move the text and the jpgs to the same page.
Do what works.
- meph5040
thats strange I have done the same thing you speak of on more than a few sites, do you have a place where we can veiw the source or is there any kind of error you could show ?