Simple ChatBot Application using PHP with Source Code


This is a simple Web Application Project entitled Simple ChatBot Application. This project was develop using PHP Programming Language. This chatbot application can simulate conversations with the end-users. The end-user can ask/query anything with this application and the chatbot will automatically respond accordingly to the queries/questions. The program has an admin panel where can admin user of this web application will feed the responses for the possible questions that users may ask/query to the chatbot. The admin panel has many features that are related to the chatbot information. The admin user can also manage some other details of the chat boot such as the welcome message, no result message for the query, and avatars. Talking about the chatbot responses, the admin will store information in the system and will tag the possible question for that response. The system also stores the questions that no answers can be found in the database. By this, the admin can check if the questions are relevant to the site. And if does, the admin user can create a response for that query.

The Simple ChatBot Application Project was developed using


  • HTML5
  • CSS
  • Javascript
  • jQuery
  • Ajax
  • Bootstrap
  • AdminLTE Template


  • PHP (version 8.0.2)
  • MySQL Database
  • MySQLi OOP



  • Chatbot Convo

Admin Panel

  • Home
  • Manage System Settings
  • Manage Responses
  • Manage Unanswered Queries

The application might help you to understand how to create a Simple ChatBot that can be added as a feature for your projects. The source code is easy to understand and modify.

Sample Images

Chat Convo Box


Admin Home




Response List


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 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 "chatbot_db".
  6. Import the provided SQL file. The file is known as "chatbot_db.sql" located inside the "db" folder.
  7. Browse the Simple ChatBot System in a browser. i.e. http://localhost/chatbot and http://localhost/chatbot/admin for the admin panel.

Admin Access Information

Username: admin
Password: admin123


That's it! This Chatbot Application is user-friendly, you can explore the features and functionalities of this PHP Project. I hope this will help you with what you are looking for and you'll find something useful for your future PHP Project.

Explore more on this website for more Free Source Codes and Tutorials.

Happy Coding :)

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 byngotamtri (not verified)on Sun, 10/17/2021 - 22:13

I have done all the instructions, the program runs ok but the image avatar changed in the admin php does not change. I don't know what's wrong please help
Submitted byAnonymous (not verified)on Wed, 11/17/2021 - 23:50

Hi ..this is running on my lap but I couldn't connect this to my website.. how can I?
Submitted bylistopia (not verified)on Thu, 07/07/2022 - 21:45

Hi guys... You have to change this... --------------------------------------------- class > DBConnection.php -------------------------------------------- private $host = "localhost"; private $username = "...."; private $password = "...."; private $database = "...."; ----------------------------- initialize.php ----------------------------- if(!defined('base_url')) define('base_url','http://www.Your');
Submitted byABAzad (not verified)on Sat, 01/27/2024 - 22:10

In reply to by listopia (not verified)

Even after doing all the things you guided, we are getting below warning Warning: session_start(): Session cannot be started after headers have already been sent in /home3/vyavsaku/public_html/chatbot/config.php on line 5 Kindly help
Submitted byHirdesh (not verified)on Mon, 07/18/2022 - 16:37

Hello, can we set this chatbot to menu/button-based chatbots (questions for user) then the user selects one after that the chatbot will reply to the selected input question by button?
Submitted bygajenth (not verified)on Fri, 05/05/2023 - 00:29

is this "Database/Knowledge base – Some of the facts needed to answer user queries should be obtained from persistent storage (e.g. data files or database stored on disk) instead of “hard coding” them into the program. For example, when a user asks a “virtual banking assistant” what types of accounts they have, the answer should be a list of accounts (current account, savings account, FD account etc) obtained from the database. "
Submitted byFredWalcott (not verified)on Fri, 12/15/2023 - 18:32

please can i get the whole documentation for the project from chapter 1 to 5
Submitted byMigufedel33443 (not verified)on Tue, 03/26/2024 - 23:05

How can I delete the Developed by oretnom23 message?
Submitted byManoj H V (not verified)on Thu, 05/16/2024 - 15:54

In reply to by Migufedel33443 (not verified)

How to remove this developed by oretnom23 message on the main scree of the web page.can u please tell me which code has to be removed
Submitted byDHANUSHKUMAR R (not verified)on Wed, 05/15/2024 - 16:51

for me this only showing: Index of /chatbot_0 Name Last modified Size Description [PARENTDIR] Parent Directory - [DIR] chatbot/ 2021-05-05 15:51 - Apache/2.4.56 (Win64) OpenSSL/1.1.1t PHP/8.1.17 Server at localhost Port 80

Add new comment