0% found this document useful (0 votes)
14 views19 pages

PHP Project

The document is a micro-project report on a 'Chatbot Application in PHP' submitted by students for their Diploma in Computer Technology. It outlines the project's aim, methodology, literature review, resources used, and the skills developed through the project. The report includes details about the programming code and the learning outcomes associated with creating an interactive chatbot application.

Uploaded by

shradd2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views19 pages

PHP Project

The document is a micro-project report on a 'Chatbot Application in PHP' submitted by students for their Diploma in Computer Technology. It outlines the project's aim, methodology, literature review, resources used, and the skills developed through the project. The report includes details about the programming code and the learning outcomes associated with creating an interactive chatbot application.

Uploaded by

shradd2006
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

A MICRO-PROJECT REPORT ON

“Chatbot Application in PHP”

In the partial fulfilment of the requirement for the Diploma In


Computer Technology

Submitted By

Name Enrollment No
Gorde Dipali Sandeep 2200800155
Gorde Sanjana Yogesh 2200800156
Darandale Shraddha Navnath 2200800160

Under the Guidance of Mr.Musale D.S.

Amrutvahini Sheti and Shiksha Vikas Sanstha’s Amrutvahini


Polytechnic, Sangamner
2024-2025
Department of Computer Technology
CERTIFICATE

This is to Certify that,

Name Enrollment No
Gorde Dipali Sandeep 2200800155
Gorde Sanjana Yogesh 2200800156
Darandale Shraddha Navnath 2200800160

Has satisfactorily carried out and completed the micro project entitled:

“ Chatbot Application in PHP ”

As prescribed by MSBTE, Mumbai, as part of syllabus for the partial


fulfilment of Diploma in Computer Technology

For the academic year 2024-2025

Prof- Mr.Musale D.S. Prof- Mr. Kale. G. B


(Guide) (HOD)
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. / Ms. Darandale Shraddha Navnath Roll No. 28 of Six Semester
Diploma in Computer Technology Dept(CM6I) Of Amrutvahini Polytechnic (0080/1105)
has completed the Microproject satisfactory in Subject WBP(22619) for the academic year
2024 to 2025 as prescribed in the MSBTE curriculum.

Place: Sangamner Enrollment No.: 2200800160

Date: Exam Seat No.:

Subject Teacher Head of the Department

Seal
ofInstitut
ion
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. / Ms. Gorde Dipali Sandeep Roll No. 23 of Six Semester Diploma
in Computer Technology Dept(CM6I) of Amrutvahini Polytechnic (0080) has completed
the Microproject satisfactory in Subject WBP (22619) for the academic year 2024 to 2025 as
prescribed in the MSBTE curriculum.

Place: Sangamner Enrollment No.: 2200800155

Date: Exam Seat No.:

Subject Teacher Head of the Department

Seal
ofInstitut
ion
MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION

Certificate

This is to certify that Mr. / Ms. Gorde Sanjana Yogesh Roll No. 24 of Six Semester Diploma
in Computer Technology Dept(CM6I) Of Amrutvahini Polytechnic (0080) has completed
the Microproject satisfactory in Subject WBP(22619) for the academic year 2024 to 2025 as
prescribed in the MSBTE curriculum.

Place: Sangamner Enrollment No.: 2200800156

Date: Exam Seat No.:

Subject Teacher Head of the Department

Seal
ofInstitut
ion
Annexure – I
Micro-Project Proposa

l Title of Micro-Project:
“Chatbot Application in PHP”

1. Aim/Benefits of the Micro-Project :


To Make a report on Chatbot application using PHP.

2. Course Outcomes Addressed :

Co.No. Course Outcome Statement


CI603.1 Use³ Different Control Statement for executing PHP Program.

CI603.2 Apply³ various object oriented concepts for executing PHP Program.

CI603.3 Use³ form controls with validation to collect user’s input.


CI603.4 Execute³ database operations in PHP.

3. Proposed Methodology:

1. In this micro project, first of all we have focused on selection of appropriate topic for the
micro-project.
2. We have decided our topic is " Chatbot application Project"
3. Then we did literature survey on our topic and gained knowledge about existing and
proposed system.
4. Then we gathered all information based on the topic of micro-project.
5. We executed our code
6. We have done analysis and study of our topic in detail.
7. By doing all the above methodologies we have successfully done our micro project.

4. Literature Review:
A literature review of Chatbot is a software application designed to simulate conversation with
users, either via text or voice, in a natural language. Over the years, chatbots have evolved from
simple question-answer systems to sophisticated virtual assistants. Their applications are vast,
ranging from customer service to healthcare, education, and even e-commerce. This literature
review summarizes the key studies and advancements in the field of chatbot applications.
5. Action Plan:

Sr. Details Of Activity Planned Planned Finish Name Of


No. dates Date Responsible
Member
1 Searching the topic for microproject 01/01/2025 06/01/2025 All Members

2 Choosing the topic for microproject 13/01/2025 21/01/2025 All Members

3 Searching the information on the topic 03/02/2025 13/02/2025 All Members

4 Working on the example of given topic 18/02/2025 28/02/2025 All Members

5 Cross checking and correcting the 03/03/2025 18/03/2025 All Members


example
6 Making the changes as per required 26/03/2025 02/04/2025 AllMembers

7 Final submission of report 07/04/2025 17/04/2025 All Members

6. Resources Required:

Sr. Name Of Resources Specification Qty Remark


No

1 Operating system with broad HP PC with 8GB RAM 1


specification
2 Operating system Win 8.1 1

3 Software Xampp 1

7. Names of Team Members with Roll Nos:

Sr. no Roll.
Name of Team Members Enrollment No.
No.
1. 23 Gorde Sanjana Yogesh 2200800155

2. 24 Gorde Dipali Sandeep 2200800156

3. 28 Darandale Shraddha Navnath 2200800160


Annexure – II
Micro-Project Report
Title of Micro-Project :-“ Chatbot Application using PHP”

1.0 Rationale:
A Chatbot in PHP is a software application designed to simulate conversation with users. The
goal is to create an interactive system that can respond to user queries in a human-like manner.
The chatbot can be programmed to answer predefined questions, offer useful information, and
guide users through a variety of tasks.

2.0 Aims/Benefits of the Micro-Project :


The aim of a chatbot application using PHP is to create an automated conversational agent that can
interact with users in real-time, understand their input, and provide appropriate responses based on
predefined rules, AI models, or dynamic data. PHP is often used in the backend to process user
requests, interact with databases, and handle the logic of the chatbot.

3.0 Course Outcomes Addressed:

Co.No. Course Outcome Statement


CI603.1 Use³ Different Control Statement for executing PHP Program.

CI603.2 Apply³ various object oriented concepts for executing PHP Program.

CI603.3 Use³ form controls with validation to collect user’s input.


CI603.4 Execute³ database operations in PHP.

4.0 Literature Review :


A literature review of Chatbot is a software application designed to simulate conversation with users,
either via text or voice, in a natural language. Over the years, chatbots have evolved from simple
question-answer systems to sophisticated virtual assistants. Their applications are vast, ranging from
customer service to healthcare, education, and even e-commerce. This literature review summarizes
the key studies and advancements in the field of chatbot applications.

5.0 Actual Methodology Followed:


The methodology for building a chatbot application using PHP involves defining the chatbot's
purpose and key features, such as real-time user interaction and database integration. It begins with
setting up a PHP-based backend on a web server, designing a simple chat interface with HTML,
CSS, and JavaScript, and using AJAX for real-time communication. PHP processes incoming user
inputs, matches them with predefined responses or fetches dynamic data from a database. Optionally,
NLP services like Dialogflow can be integrated for advanced understanding of user queries. The
application is then tested for functionality and performance before being deployed on a live server.
6.0 Actual Resources Used :

Sr. Name Of Resources Specification Qty Remark


No

1 Operating system with broad HP PC with 8GB RAM 1


specification
2 Operating system Win 8.1 1

3 Software Xampp 1

 Program Code
1. HTML code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style1.css">
<script src="https://kit.fontawesome.com/a076d05399.js"></script>
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
</head>
<body>
<div class="wrapper">
<div class="title">Online Chatbot</div>
<div class="form">
<div class="bot-inbox inbox">
<div class="icon">
<i class="fas fa-user"></i>
</div>
<div class="msg-header">
<p>Hello there, how can I help you?</p>
</div>
</div>
</div>
<div class="typing-field">
<div class="input-data">
<input id="data" type="text" placeholder="Type something here.." required>
<button id="send-btn">Send</button>
</div>
</div>
</div>
<script>
$(document).ready(function(){
$("#send-btn").on("click", function(){
$value = $("#data").val();
$msg = '<div class="user-inbox inbox"><div class="msg-header"><p>'+ $value
+'</p></div></div>';
$(".form").append($msg);
$("#data").val('');

$.ajax({
url: 'message.php',
type: 'POST',
data: 'text='+$value,
success: function(result){
$replay = '<div class="bot-inbox inbox"><div class="icon"><i class="fas
fa-user"></i></div><div class="msg-header"><p>'+ result +'</p></div></div>';
$(".form").append($replay);
$(".form").scrollTop($(".form")[0].scrollHeight);
}
});
});
});
</script>

</body>
</html>

2. CSS code:
@import url('https://fonts.googleapis.com/css2?
family=Poppins:wght@200;300;400;500;600;700&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
html,body{
display: grid;
height: 100%;
place-items: center;
}
::selection{
color: #fff;
background: #007bff;
}

::-webkit-scrollbar{
width: 3px;
border-radius: 25px;
}
::-webkit-scrollbar-track{
background: #f1f1f1;
}
::-webkit-scrollbar-thumb{
background: #ddd;
}
::-webkit-scrollbar-thumb:hover{
background: #ccc;
}

.wrapper{
width: 370px;
/background: #fff;/
background-image: url(bg.jpg);
border-radius: 5px;
border: 1px solid lightgrey;
border-top: 0px;
}
.wrapper .title{
background: #128C7E;
/background:red;/
color: #fff;
font-size: 20px;
font-weight: 500;
line-height: 60px;
text-align: center;
border-bottom: 1px solid #128C7E;
border-radius: 5px 5px 0 0;
}
.wrapper .form{
padding: 20px 15px;
min-height: 400px;
max-height: 400px;
overflow-y: auto;
}
.wrapper .form .inbox{
width: 100%;
display: flex;
align-items: baseline;
}
.wrapper .form .user-inbox{
justify-content: flex-end;
margin: 13px 0;
}
.wrapper .form .inbox .icon{
height: 40px;
width: 40px;
color: #fff;
text-align: center;
line-height: 40px;
border-radius: 50%;
font-size: 18px;
background: #25D366;
}
.wrapper .form .inbox .msg-header{
max-width: 53%;
margin-left: 10px;
}
.form .inbox .msg-header p{
color: #fff;
background: #25D366;
border-radius: 10px;
padding: 8px 10px;
font-size: 14px;
word-break: break-all;
}
.form .user-inbox .msg-header p{
color: #333;
background: #efefef;
}
.wrapper .typing-field{
display: flex;
height: 60px;
width: 100%;
align-items: center;
justify-content: space-evenly;
background: #efefef;
border-top: 1px solid #d9d9d9;
border-radius: 0 0 5px 5px;
}
.wrapper .typing-field .input-data{
height: 40px;
width: 335px;
position: relative;
}
.wrapper .typing-field .input-data input{
height: 100%;
width: 100%;
outline: none;
border: 1px solid transparent;
padding: 0 80px 0 15px;
border-radius: 3px;
font-size: 15px;
background: #fff;
transition: all 0.3s ease;
}
.typing-field .input-data input:focus{
border-color: #25D366;
}
.input-data input::placeholder{
color: #999999;
transition: all 0.3s ease;
}
.input-data input:focus::placeholder{
color: #bfbfbf;
}
.wrapper .typing-field .input-data button{
position: absolute;
right: 5px;
top: 50%;
height: 30px;
width: 65px;
color: #fff;
font-size: 16px;
outline: none;
border-radius: 3px;
background: #25D366;
border: 1px solid #25D366;
transform: translateY(-50%);
transition: all 0.3s ease;
}
.typing-field .input-data button:hover{
background: #075E54;
}

3. PHP code:
<?php
$conn = mysqli_connect("localhost", "root", "", "bot") or die("Database Error");

$getMesg = mysqli_real_escape_string($conn, $_POST['text']);

$check_data = "SELECT replies FROM chatbot WHERE queries LIKE '%$getMesg%'";


$run_query = mysqli_query($conn, $check_data) or die("Error");

if(mysqli_num_rows($run_query) > 0){


$fetch_data = mysqli_fetch_assoc($run_query);
$replay = $fetch_data['replies'];
echo $replay;
}else{
echo "Sorry can't be able to understand you!";
}

7.0 Outputs of the Micro-Projects:


8.0 Skill Developed / Learning outcomes:
• Problem Analysis
• Solution Design
• Project Planning
• Database Interaction
• Logical Reasoning
• Backend Development
• Testing and Debugging
• Presentation Competence

9.0 Applications of the Micro-Project:


 Automate responses to frequently asked questions (FAQs) or common customer queries.
 Provide 24/7 customer support, resolving issues like order tracking, product inquiries, or
troubleshooting.
 Capture user information through conversations, qualify leads, and generate sales
opportunities.
 Collect contact details and other relevant data to send to the sales team for follow-up.
 Provide users with quick access to company policies, services, or product details.
 Automatically respond to queries based on a predefined set of rules or a knowledge base.

Teacher Signature
(Mr.Musale D.S.)

You might also like