Simple Chatbot

v1.0 DLE Modules 0 (0 reviews) 235 views

Simple Chatbot using PHP with MySQL & jQuery (Ajax)

A chatbot is a computer program designed to simulate human conversation. These chatbots reply to you instantly according to your queries because programmers have inserted thousands of inputs/replies/queries into the database that can be asked by the user. To make an advanced chatbot we’ve to code more and more but I tried to make a simple chatbot with few lines of codes and queries which help you to get an idea about how chatbot actually works.

In this Plugin [Simple Chatbot using PHP], on the webpage, there is a chat form with an input field and a button labeled as “send” for typing a message and send to the bot. When you ask something to the bot and that query exists in the database then the bot replay a message according to your query instantly but if your query not matched to the database queries then the bot replays a message labeled as “Sorry can’t be able to understand you!”. In this chatting process, the webpage isn’t reloaded because I used jQuery (Ajax) for that.

Instalation

Paste in main.tpl Before <body>

<link href="{THEME}/chatbot/css/style.css" type="text/css" rel="stylesheet">
<script src=\'{THEME}/chatbot/js/wafloatbox-0.2.js\'></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css" integrity="sha512-xh6O/CkQoPOWDdYTDqeRdPCVd1SpvCA9XXcUnZS2FmJNp1coAFzvtCN9BmamE+4aHK8yyUHUSCcJHgXloTyT2A==" crossorigin="anonymous" referrerpolicy="no-referrer" />

 Paste in main.tpl Before </body>

 <div class="myk-wa">

</div>   
<script>
    $(document).ready(function(){
        $(".myk-wa").WAFloatBox();
    });
</script>
<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(\'\');
                
                // start ajax code
                $.ajax({
                    url: \'message.php\',
                    type: \'POST\',
                    dаta: \'text=\'+$value,
                    success: function(result){
                        $replay = \'<div class="bot-inbox inbox"><div class="icon"><i class="fa fa-user"></i></div><div class="msg-header"><p>\'+ result +\'</p></div></div>\';
                        $(".form").append($replay);
                        // when chat goes down the scroll bar automatically comes to the bottom
                        $(".form").scrollTop($(".form")[0].scrollHeight);
                    }
                });
            });
        });
    </script>

Price

Free

  • Quality assured
  • Free updates
  • Support included

Features

8
  • Built with PHP, MySQL, and jQuery (Ajax)
  • Instant bot replies based on predefined database queries
  • No page reload required during chat interaction
  • Simple chat interface with input and send action

+4 more features

Tags

DLE Modules v1.0 Free
Version v1.0
Category DLE Modules

Requirements

No requirements specified.

What is new

Updated to version 1.0

Feb 11, 2026

Released

Oct 01, 2022

License details

License type Standard license
Delivery Instant delivery
Updates Free updates
Support Support included

Need help?

Docs: No documentation yet
Email support: support@ticcix.com
Contact support

Refund policy

Eligible purchases can be refunded based on policy terms.

Read refund policy

Share