Simple Online Document Sharing System using PHP/MySQLi with Source Code


Project: Simple Online Document Sharing System using PHP/MySQLi


The Online Document Sharing System is a simple file sharing platform project that can help a company share their documents and also for online classes especially for those schools that currently using Modular Learning Process. This system allows the user to share his/her documents by uploading the files to the system with the details for the target receiver reference for the shared document. This system can be helpful especially for currently using Modular Learning Process due to the pandemic. Using this system faculty of a certain school can upload the soft copies of modules then share the document using the provided link. Each document can store multiple files which means in this feature the user files are well organized.

The system works this way. For example, a teacher will store the students' modules soft copies for week 1 in a single document and save it with the title of "Module set for week 1" and the teacher can add notes in the description box. After that, the teacher will click the "Share this Document" button on the document view page to get the shareable link. Then when the student browses the shared link in his/her browser, the document details and files will be shown, then the student can download the files by clicking the download icon from the "File/s Panel" of the page.


Both Admin and Users Side

  • Login Page
    • The page where system users will submit their credentials to access the data and functionalities of the system.
  • Dashboard Page
    • The page where the system users will be redirected by default after logging into the Online Document Sharing System.
  • Manage Account Modal
    • The popup modal where the system users update their system credentials such as their email and password.
  • Document List
    • The page where all documents are listed. The admin can see all the documents that been created in the system while the users can only see his/her created documents.
  • Manage Document Page
    • The page where the system users create or update a document.
  • Document View Page
    • The page where the system user can download the files of the document.

Admin Side

  • New User Page
    • The page where can system admin create a new user.
  • Manage Users
    • This feature includes View, Edit, and Delete for the user list.

The Online Document Sharing System was developed using HTML, PHP/MySQLi, CSS, JavaScript (jQuery/Ajax), and Bootstrap for the design. The source code is fully functional and easy to modify or enhance. Follow the instruction below to have an actual experience using this simple project.

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 odss_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/online-document-sharing-system]

Default Admin Access

Email: [email protected]
Password: admin123

I hope this simple Online Document Sharing System will help you with what you are looking for, feel free to download and modify the source code.

Explore more on this website for more source codes 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.


Submitted byAndrez (not verified)on Sat, 02/13/2021 - 00:48

: Invalid argument supplied for foreach() in /opt/lampp/htdocs/app/view_document.php

Try to change the Code of view_document.php


  1. <?php
  2. include 'db_connect.php';
  3. $qry = $conn->query("SELECT * FROM documents where md5(id) = '{$_GET['id']}' ")->fetch_array();
  4. foreach($qry as $k => $v){
  5. if($k == 'title')
  6. $k = 'ftitle';
  7. $$k = $v;
  8. }
  9. ?>
  1. <?php
  2. include 'db_connect.php';
  3. $qry = $conn->query("SELECT * FROM documents where md5(id) = '{$_GET['id']}' ");
  4. if($qry->num_rows > 0 ){
  5. foreach($qry->fetch_array() as $k => $v){
  6. if($k == 'title')
  7. $k = 'ftitle';
  8. $$k = $v;
  9. }
  10. }else{
  11. //do something here...
  12. }
  13. ?>
Submitted byRosaaaa (not verified)on Fri, 05/28/2021 - 07:31

I can t make this application online , could you help me please ?
Submitted byBlay Sampson (not verified)on Thu, 09/09/2021 - 18:13

Thanks You very much, you are make a great job.
Submitted byjoseph jara ortiz (not verified)on Thu, 01/20/2022 - 22:48

Como haría para poder hacer q el documento se pueda previsualizar en un modal
Submitted byAntonio Cunille (not verified)on Tue, 03/08/2022 - 07:45

For some reason I cannot create a new user. I can modify existing ones, add files but not save a new user.
Submitted byADONGO DANIEL … (not verified)on Sun, 04/03/2022 - 06:04

Invalid @argument supplied foreach() in c:\xamp\htdocs\document\view_document.php on line 67
Submitted byrobeletu23 (not verified)on Thu, 05/16/2024 - 17:06

it works on local host but not working in cpanel. please help

Add new comment