Skip to content

A simple web-based chatbot using PHP and MySQL. Users enter text via a form, and the bot replies based on predefined responses from a database. Includes a responsive UI with Bootstrap. Ideal for beginners learning PHP, HTML, and MySQL integration. Easy to run on XAMPP/WAMP. Ask ChatGPT

Notifications You must be signed in to change notification settings

JananiRS-git/chat_bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Chat_Bot – Simple PHP-Based Chatbot This is a simple web-based chatbot built using PHP, HTML, and MySQL. It allows users to interact with a bot that responds based on predefined entries in a database.

🧩 Features

  • Text-based interaction
  • PHP backend handling form submission
  • MySQL database for bot replies
  • Clean and simple UI using Bootstrap
  • Easy to set up and run locally

πŸ“ Files Included

  • index.html – User interface with chatbot form
  • process.php – Handles input and fetches bot response from database
  • img.jpeg – Background image (ensure this is in your project directory)
  • MySQL database: chatbot with a table responses (fields: user_input, bot_reply)

πŸš€ How to Run

  1. Start your local server using XAMPP/WAMP.
  2. Create a MySQL database named chatbot.
  3. Create a table responses with the following structure:
    CREATE TABLE responses (
      id INT AUTO_INCREMENT PRIMARY KEY,
      user_input VARCHAR(255),
      bot_reply VARCHAR(255)
    );
    
    
    

INSERT INTO responses (user_input, bot_reply) VALUES ('hello', 'Hi there!'), ('how are you', 'I am just a bot, but I am doing great!');

Note 1.This is a basic demo. No input sanitization is applied. 2.For production use, ensure secure coding practices (e.g., use prepared statements).

About

A simple web-based chatbot using PHP and MySQL. Users enter text via a form, and the bot replies based on predefined responses from a database. Includes a responsive UI with Bootstrap. Ideal for beginners learning PHP, HTML, and MySQL integration. Easy to run on XAMPP/WAMP. Ask ChatGPT

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published