Hello everyone!
I am not good in PHP, AJAX, jQuery and JS. I am exploring and doing self study on a chat application on web. But I can't figure out why every time the message received by the other user, it duplicates as if its copying all the recent messages plus the new message. I have attached the file so you can test it for yourself. Hope I am clear.
Thanks in advance for all your help.