Skip to main content

Photo Share Website using PHP/MySQL with Source Code


Project: Photo Share Website using PHP/MySQL with Source Code


The Photo Share Website is a simple PHP/MySQL project that store and share users uploaded images. This project was inspired by Instagram and Facebook Moments Web Applications. In this project, users of the site can upload multiple numbers of the photo and can be shared by all users of the website. This posted images can be multiple like from Instagram Application. The posted multiple photos will be displayed on a single card along with the user post content. All posted or shared photos will be shown to all users of the website and not only for a selected user/s. For uploading feature, user can simply drag and drop their images to the bordered area in upload page or manually choose a file. Then the user will choose if they want to share the image/s for all users or just store first to later post. In each post card at the home page, users can also write a comment for the user who shared the image/s and same with the user who posted. For the stored images/ photo that wanted to share or re-post, user's will simply hover or point their mouse cursor to their selected image to show the share button, and by clicking this button popup modal will be shown for post content of the user.


  • Login Page
    • The page where the users will submit their system credentials to access the website home timeline and managed their own stored images.
  • Sign-up Modal
    • The popup modal for user's registration. 
  • Home Page
    • The page where all shared photos are shown and where can users write comment to the post.
  • Upload Page
    • The page where can user upload his/her images they want to store and share. This the page where can user post an image/.

How to Run

  1. Download the source code and extract the zip file.
  2. Download or set up any local web server that runs PHP script.
  3. Open the web-server database and create a new database name it social_db.
  4. Import the SQL file located in the database folder of the source code.
  5. Copy and paste the source code to the location where your local web server accessing your local projects. Example for XAMPP('C:\xampp\htdocs')
  6. Open a web browser and browse the project. E.g [http://localhost/photo-share-website-using-php]

This simple Photo Share Website project is for educational purposes only. This is only to explain how to create a Photo Gallery and Post Photo Like Instagram App using PHP/MySQLi.

I hope this project with source code helps you with what you are looking for. Feel free to download and customize the source code.

Explore more on this website for more Source Code and Tutorials.


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 for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.


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.

Add new comment