how can i alert the user already logged in for the new user logged in……..suppose….
user1 one is currently logged in and user2 is offline.
i want to alert user1
when user2 logged in…………
how can i achieve this
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you’re looking for logic:
I would keep a table of
Currently Logged In Usersand a table ofNotification RelationshipsYou could write a simple PHP script that checked to see if any row in the
Notification Relationshipstable are both in theCurrently Logged In Userstable.You could use a
setTimeout()event to run a jQuery ajax script every 20/30 seconds or so, that would hit your php script.If you’re looking for actual code, I could probably get a demo working in an hour or two.