954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How do I upload images to mysql database using php5

I am building a website that uses php5 and mysql database. I want to upload images alongside other information. To get other information into the table of the database, this I can do very well, but to upload and display the images alongside other information(which may be done online by the users), I am finding very difficult.

Can someone please help me solve this?


Thanks.

okonjiaustin
Newbie Poster
7 posts since Dec 2003
Reputation Points: 10
Solved Threads: 0
 

Uploading images to a table ? 99% of the people who upload an image wouldn't upload it to the table. Instead, they upload the image to the filesystem and insert the path of the image to the table. Fetching the blob data from the database just adds on to the server load. But if you want to insert an image to a table, you can check this site.

nav33n
Purple hazed!
Moderator
4,465 posts since Nov 2007
Reputation Points: 524
Solved Threads: 356
 

Here is a link for some working examples for a book called PHP Solutions by Friends Of Ed
http://www.friendsofed.com/download.html?isbn=1590597311

You'll have to sift through the zip file for the scripts for uploading images and resizing them. I think it'll be around chapter 8 or so. VERY helpful.

P.S. If you have no knowledge of PHP then you might want to get the book. It's very descriptive which makes for easy learning.

Venom Rush
Posting Whiz
353 posts since Oct 2007
Reputation Points: 31
Solved Threads: 2
 

i posted image upload code here already. try to make search. with some little modifications to save ur images on your database.

fatihpiristine
Posting Whiz in Training
283 posts since Sep 2007
Reputation Points: 6
Solved Threads: 19
 

i am using php4 the image upload is working well. But upgrade the version php5 the file upload is doesn't work. I entered the global register is ON also the image upload is not work. the same file is working under php4 is fine. why this problem occurs? Can any one tell me about this?

janani26
Newbie Poster
1 post since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You