or

how to make a Real-time chat application using PHP, AJAX & MYSQL

Give me some codes :) or some link ;)

For detailed information, you can walk through this video:

Here is the source code of Chat Application by another YouTube Creator.
https://www.dropbox.com/s/bslb562b9kt8era/chat.zip

Here is an explanation of the source code— https://youtu.be/XkV9XdHueL8