Loading

Image Upload using PHP/MySQL

Submitted by: 
Language: 
Visitors have accessed this post 11802 times.


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



Download Code: 

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

am i missing something, where is the database code?
thanks

admin's picture

there's an sql file embedded in the zip file.

very help full website

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

where does the images stored?

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.......
..

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

it is usefull a lot......

VERY GREAT CODE, WORKS PERFECT....

How do you upload to an option selected folder in php. please can someone help tweak the code

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

Add new comment

Filtered HTML

  • You may insert videos with [video:URL]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.