Note that here I am not actually going to talk about 'how' to make a chatroom, nor will I present any code. I am just going to talk about it in a very high level manner. I try to explain things as much as I can, but if there are things that are not very understandable, I am pretty sure that you can find out about them just by a few searches in the internet. I am also quite sure that if you do enough research, based my explanations you can make your own chatroom! So let' begin:
Second, each time you send a message, your message is stored in a mySQL remote database. So are the messages sent by the person you are chatting with. Now the issue is: How can you get to see the messages sent by you friend? Here was my solution: Do you remember in the last topics I talked about AJAX requests? (Just to remind you, AJAX is a method of communication with the server without the need to refresh the whole page).
Note that these were just very brief descriptions of the procedure ... If I want to explain everything about this it will probably take me at least 5-6 blog posts. But since I know it is going to be boring for some of you, I will not be doing it here :)
Image Source: <Chrome Web Store - myChecklist . Available in: https://lh3.googleusercontent.com/g0G64-L84uNn8mDfpqA2aJcH5_HtAxWT_pQ69QV2UFtELGVRI09fsg0N6cDP3Zr2qHKp0K20Mw=s640-h400-e365-rw>