Simple Phone book/directory Web App using PHP Free Source Code


This is a PHP Mini-Project called Phone book/directory Web App. This is a simple web application for saving someone's contact number. This can be useful for a small company to serve as the employees/staffs contact directory or else. The main purpose of creating this app is to share this with you most especially for beginners and new to PHP language to have a simple PHP project to learn with. This will help you to learn how to develop a simple web application using the said programming language and MySQL Database that containing CRUD Operations/functionalities.

About the Phone book/Phone Directory Web App

This web-based application was developed using PHP, MySQL Database, HTML, CSS, and JavaScript. The application has a pleasant user interface and is easy to use. The system requires system users' credentials to access the list of the phone books or directories and other features of the application. The new user can create a new system account by registering their credentials. The source code is free to download. Feel Free to download and modify the source code to learn and enhance your PHP programming capabilities.


  • User Login and Registration
  • Home Page
  • Add New Contact
  • Edit Contact Details
  • Delete Details
  • View All Contacts
  • View Account Details
  • Update Account Details
  • Change Password
  • Contact Us Page
  • Logout

System Snapshots

User Registration Form

Phonebook Website

Home Page

Phonebook Website

New Contact Form

Phonebook Website

Update Contact Details Form

Phonebook Website

Contact List

Phonebook Website

Change Password

Phonebook Website

How to Run ??


  • Download and Install any local web server such as XAMPP/WAMP.
  • Download the provided source code zip file. (download button is located below)


  1. Open your XAMPP/WAMP's Control Panel and start the Apache and MySQL.
  2. Extract the downloaded source code zip file.
  3. If you are using XAMPP, copy the extracted source code folder and paste it into the XAMPP's "htdocs" directory. And If you are using WAMP, paste it into the "www" directory.
  4. Browse the PHPMyAdmin in a browser. i.e. http://localhost/phpmyadmin
  5. Create a new database naming phonebook.
  6. Import the provided SQL file. The file is known as phonebook.sql located inside the extracted source code folder.
  7. Browse the Phone book/directory Web App in a browser. i.e. http://localhost/PhoneBook.

Sample User Access Information

Username: khan
Password: 123


That's it! I hope this Phone book/directory Web App in PHP will help you with what you are looking for.

Enjoy :)

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 byProsenjeet Dasgupta (not verified)on Thu, 10/21/2021 - 11:03

How to add search option to your application so that visitors may search for a person?
Submitted byEltato-Felipe (not verified)on Wed, 12/01/2021 - 13:32

Great! Everything works perfectly, very didactic for learners, good job.
Submitted byEXPLOIT (not verified)on Fri, 02/18/2022 - 18:41

# Exploit Title: Simple Phone book/directory 1.0 - 'Username' SQL Injection (Unauthenticated) # Date: 21/08/2021 # Exploit Author: Justin White # Vendor Homepage: # Software Link: # Version: 1.0 # Testeted on: Linux (Ubuntu 20.04) using LAMPP ## SQL Injection # Vulnerable page http://localhost/PhoneBook/index.php # Vulnerable paramater username1 & password # POC Username = ' or sleep(5)='-- - Password = ' ' Using these to login will have the webapp sleep for 5 seconds, then you will be logged in as "' or sleep(5)='-- -" # Vulnerable Code index.php line 13 $sql = mysqli_query($dbcon,"SELECT * FROM userdetails WHERE username = '$username' AND password = '$password'");
Submitted byBjorn (not verified)on Sun, 04/10/2022 - 05:59

though the effort of sharing is appreciated, this is NOT good code to learn php with. exploits as already mentioned are present, there is no decent login checking (just try to logout, then go back to dashboard.php, you will get the contacts), lots of "dead" code, lack of checks, ... and though you are using a DB and registration system, all users share 1 directory.

Add new comment