Chat App using PHP with MySQL & JavaScript Ajax



Chat app using PHP with MySQL & JavaScript Ajax | Chat App using PHP

In this video, I have shown you how you can create a complete chat web app using php with mysql and javascript ajax. In this chat app, first you’ve to signup if you’re new on the chat application then after successfully signed up, you’ll be redirected to the users area page where users like you who have signed to this chat app will appear there with thier full name, profile image, active status and so on. You can select any user to start chat with them. You can also easily logout from the chat application by clicking on the logout button and after successfully logout, you’ll be redirected to the login page of the chat app and your status will be offline for other signed up users. You’ve to login with your signed up email and password to enter to the chatting page again.

How to Upload this Chat App to an Online Server for Free
➤ Watch: https://youtu.be/8brkoQFWk8M

Download Codes From Here – https://www.codingnepalweb.com/2021/02/realtime-chat-application-using-php-mysql-ajax.html

Second Channel – https://bit.ly/3aHNkru
My Code Editor – https://youtu.be/55VjXTeYkTE
Facebook – https://www.facebook.com/coding.np
Instagram – https://www.instagram.com/coding.np

Timestamps:
0:00 Demo of Chat App
12:38 HTML & CSS Start
12:51 Creating Signup Form (HTML)
15:40 Styling Signup Form (CSS)
21:03 Creating Login Form (HTML)
23:01 Creating Users List Page (HTML)
24:50 Styling Users List Page (CSS)
35:07 Creating Chat Area Page (HTML)
35:51 Styling Chat Area Page (CSS)

JavaScript Codes Timestamps
46:36 JavaScript Start
51:33 Search Bar Show Hide Toggle
57:23 Ajax for Signup Form
1:31:04 Ajax for Login Form

PHP Codes Timestamps
1:01:26 Creating Database
1:01:41 Configuration with Database
1:04:30 PHP Code for Signup Form
1:10:09 Creating Tables
1:32:01 PHP Code for Login Form
1:38:09 Making Users Page Dynamic
1:58:45 Making Chat Area Dynamic
2:20:14 Showing Last sent Message
2:35:21 PHP Code for Logout user

Music Credit:
Track: Jordan Schor & Harley Bird – Home [NCS Release]
➤ Watch: https://youtu.be/KmwpogFtb4Q

Track: Jimmy Hardwind – Want Me (feat. Mike Archangelo)
➤ Watch: https://youtu.be/-Rw8zR9wmTY

Track: Lost Sky – Vision [NCS Release]
Music provided by NoCopyrightSounds.
➤ Watch: https://youtu.be/7RU1l8GtGOc

Acejax feat. Danilyon – By My Side [NCS Release]
➤ Watch: https://youtu.be/SE_8DxZLmLk

ROY KNOX – Blue Eyed Demon [NCS Release]
➤ Watch: https://youtu.be/KBtmHyfOMNU

36 thoughts on “Chat App using PHP with MySQL & JavaScript Ajax

  1. thanks for this video.
    i have inquiry about something, when successfully sign up and move to users page if you click browser back button the form will still hold the info, how we can clear it in this case?

  2. Hello can u pls make a portion along with it, where users can group chat as well, and while receiving a msg there is a sound like beep or something else, and user update settings like update email, username,password and profile pic thank you

  3. answer me one thing cuz when i hopedo all the files i do everything right more when i click to send aaa message to the other error nn opens mosttra all right just when the message is sent ?

  4. Is this a real time chat? I cant watch the video right now and I would like to know it. When u send a message the other user will recieve it without reload page?

  5. Hey! I love your videos they are very helpful and awesome! I'm currently working on my IT Project in college. I'm building a website locally through lavarel and a localhost and would like to use this Chat Web App in it. Just wondering if would there be any problem hosting it on my website? Hope to hear from you soon! 🙂

  6. Pleaseeeeeeeeeeeeeeeeeeeee 1:40:00
    <br />
    <b>Notice</b>: Undefined variable: coon in <b>C:xampphtdocsChatBoxWeb CodingNepalphplogin.php</b> on line <b>9</b><br />
    <br />
    <b>Warning</b>: mysqli_query() expects parameter 1 to be mysqli, null given in <b>C:xampphtdocsChatBoxWeb CodingNepalphplogin.php</b> on line <b>9</b><br />
    <br />
    <b>Warning</b>: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in <b>C:xampphtdocsChatBoxWeb CodingNepalphplogin.php</b> on line <b>10</b><br />
    Email ou Senha está incorretos!

  7. Hello! Great video tutorial!
    I am having problems with signup.php when a client signs up and selects a photo. The client receives a message that he should choose an image although he has already chosen it. Could you suggest what is the reason?

    PS. This code was taken from your link.

    if(isset($_FILES['image'])){
    $img_name = $_FILES['image']['name'];
    $tmp_name = $_FILES['image']['tmp_name'];

    $img_explode = explode('.',$img_name);
    $img_ext = end($img_explode);

    $extensions = ["jpeg", "png", "jpg"];
    if(in_array($img_ext, $extensions) === true){
    if(in_array($img_type, $types) === true){
    $new_img_name = $time.$img_name;
    if(move_uploaded_file($tmp_name,"images/".$new_img_name)){
    $time = time();

Leave a Reply

Your email address will not be published. Required fields are marked *