如何使用php和mysqli进行聊天创建聊天程序[关闭]

I need to know that how i can create a chat program using php and mysqli for chatting Till now I created a Login & Registration form for my website you can visit and see the design and work of my website http://programmingvivek.twomini.com/ So please help me I am new in PHP And How to refresh messages using ajax

One way for doing message load asynchronously is using Javascript "jQuery" Library:

1) You can make request POST||GET request with jQuery to PHP File Like this:

$.post("path/to/phpfile.php",{"loadmessages":"*"},function(data){

     console.log(data); //Here will be loaded PHP file echo data;

  });

2) Then you must make PHP file like this

 if(isset($_POST['loadmessages'])){

    //get messages from mysql then echo them

           echo "response";

    }

3) then you can append that response to your chat pool with jQuery.