Real-time response between two logged in users

I’m a beginner with PHP/MySQL and new to javascript as well, I want to make a page that one user could send a real-time request to another user. For example, UserA could see the list of online users, and send a request to UserB (online), UserB’s page would have a popup alert, and UserB has the option to click Yes or No. UserA would receive a popup with B’s response (or if timed out then default to No)

How is this usually done? I guess my questions has 2 parts:

  1. how to record online/offline users? (should I have a table
    recording login/logout times?)
  2. how to usually send message
    between 2 users

Leave a Reply


Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.