title: alert message when database updated
body: <p>I am creating a Chat application in php.</p>
  
  <p><strong>AIM:</strong>
  when a user1 invites <em>user2</em>, <em>user2</em> want to get a alert or popup message that <em>user1</em> has invites him. </p>
  
  <p><strong>What i have done is -</strong></p>
  
  <p>When <em>user1</em> invites, the message is stored in database. In user side i used to check whether 
  Database is updated or not. If database is update i used to show alert. This i done on php and javascript but not working all time.</p>
  
  <p>Is this a good method? Any other method?</p>