Chat Application using PHP with MySQL & JavaScript

Chat Application using PHP with MySQL & JavaScript

In this video, I have shown you how you can create a Complete Chat Application using PHP with MySQL & JavaScript. 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 their full name, profile image, active status and so on. You can select any user to start to…

Similar Posts

23 thoughts on “Chat Application using PHP with MySQL & JavaScript
  1. Salut Coding nepal! C'est très intéressant tout sa ! Mais j'ai réussi à mettre votre chat à jour, je l'est completement modifier et sa donne un résultat extraordinaire ! Merci, si vous voulez voir le résultat, bein dite le moi ! Merci

  2. Sir, i have all code from your website source code…..Pls make a video how to connect those code with wamp server local host and also how to upload in a live server….Pls step by step…. Because here some error issue i have…. Thank u

  3. sir, i face this fatal error how can i solve it plese give me a solution ..

    Fatal error: Uncaught ArgumentCountError: mysqli_fetch_assoc() expects exactly 1 argument, 2 given in C:xampphtdocsMychatChatappphpdata.php:7 Stack trace: #0 C:xampphtdocsMychatChatappphpdata.php(7): mysqli_fetch_assoc(false, true) #1 C:xampphtdocsMychatChatappphpusers.php(11): include_once('C:\xampp\htdocs…') #2 {main} thrown in C:xampphtdocsMychatChatappphpdata.php on line 7

  4. <br /> <b>Fatal error</b>: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in D:xampphtdocschatAppphpsignup.php:13 Stack trace: #0 D:xampphtdocschatAppphpsignup.php(13): mysqli_num_rows(false) #1 {main} thrown in <b>D:xampphtdocschatAppphpsignup.php</b> on line <b>13</b><br />


    include_once "config.php";

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

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

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

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

    if(!empty($fname) && !empty($lname) && !empty($email) && !empty($password)){

    if(filter_var($email, FILTER_VALIDATE_EMAIL)){

    $sql = mysqli_query($conn, "SELECT email FROM userse WHERE email = '{$email}'");

    if(mysqli_num_rows($sql) > 0){

    echo "$email – This email already exist!";



    $img_name = $_FILES['image']['name'];

    $tmp_name = $_FILES['image']['tmp_name'];

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

    $img_ext = end($img_explode);

    $extensions = ['png', 'jpeg', 'jpg'];

    if(in_array($img_ext, $extensions) === true){

    $time = time();

    $new_img_name =$time.$img_name;

    if(move_uploaded_file($tmp_name, "images/".$new_img_name)){

    $status = "Active now";

    $random_id = rand(time(),10000000);

    $sql12 = mysqli_query($conn, "INSERT INTO userse (unique_id, fname, lname, email, password, img, status)

    VALUES ({$random_id}, '{$fname}', '{$lname}', '{$email}', '{$password}', '{$new_img_name}'), '{$status}'");


    $sql13 = mysqli_query($conn, "SELECT * FROM userse WHERE email = '{$email}'");

    if(mysqli_num_rows($sql13) > 0){

    $row = mysqli_fetch_assoc($sql13);

    $_SESSION['unique_id'] = $row['unique_id'];

    echo "success";



    echo "Something went wrang!";




    echo"Please select an Image file – jpge jpg png!";



    echo "Please select an Image file!";




    echo "$email – This is not a valid email! ";


    }else {

    echo "All input field are required";



  5. I speak Portuguese I am making this comment using a translator but I did not want to stop coming to thank you for the beautiful work you taught, even if you write in English your didactic is great taught me what I have been trying to learn for 1 year, thank you, God bless you, you became my master of programming.

  6. thanks a lot for this hardwork for us…. can i use the source code and modify it and make it go online??? and can you create such application but not in browwser but as an actual apk?? i request you can u please create such app as an apk
    …. btw thanks again

Leave a Reply

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