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.

Recommended Answers

All 4 Replies

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.

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.

Member Avatar for fatihpiristine

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

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?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.