Image Upload using PHP/MySQL

Language
This code will help you to create a image upload using php. This is unique with other image upload because unlike other this code has a database to store your uploaded image. Hope this code will help, leave comment if you have a question regarding on this code. Thank you and happy coding. database name:photoupload

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

After spending hours looking for a tutorial on file uploads this is the only working one I have found!

what if i would only want to show one photo, or a specific photo, what codes would i use,, hope you could help me,

it is note porfect code it stors image in file not in database.......
..

In reply to by Anonymous (not verified)

do not tell me you want to actually save the picture file in your database???? :D to the autor: thanks very very much! exactly what i was looking for!

OMG! The one i've been looking for ages! Thank you for the nice tutorial.. :) 2thumbs up!

This is good tutorial. It is really helpful

VERY GREAT CODE, WORKS PERFECT....

what will i do if there is nothing happen when i click the submit button? do i need to change some codes?

Super thank you! It's working! :) but how can I delete or change the picture without changing anything at my database? Thank you!! :D

Thanks a lot

Thank u bro u been very helpful

Is it possible to change the name of the file uploaded somehow? I want to change what ever filename the picture has into the name of the user, who downloads it. Is this possible and is so, how?

Dear all helpers, please help me! I need the codes sample to update image in database using php and mysql, thanks.

Why does it keep saying this? I uploaded the sql file and changed the config. I have others running on the same db so I know it works. What could I be doing wrong?

thanks you this coed, is working will, but please i have one problem, if i want to view one image from all images in the database. how do i do it

Thank for the lovely coed, but i have a problem, if i want to view one image at a time for all images in the in the database, how do i do it

Good codes but i think you should keep on improving it for users. Limit uploads to only images and limit size and capacity otherwise thanks....it helped me save someone

In reply to by Lito Sam (not verified)

It helped you... save someone?

Where is the .zip file?? Is there any link to download it??

why my pictures are corrupted when i upload it?

helo a lot of thanks for you...ang dami mong natulungan dhil sa pg share ng mga codes lalong lalo ung ktulad ko na cs student..thank you talaga and GOD bless..

Please anyone help me for multiple uploads, Its working fine for me . Thank you :)

Now I understand about how to upload photo already I try to fix my error a lot of day but still not find my error when I saw your project and I do with you I had fix it . thank you so much .

sir argie, paano gawing mulitple pics ang eselect kasi 1pic lang puwede upload at kung paano create ng album then kapag na create na puwede ko eselect ang album at doon ko upload ang pics na gusto ko.thank you

Add new comment