How can I develop an alert system like Facebook’s, where User A add User B, User B will get some number in Friend Request Section on the header like in the image below. How can I develop something like that?
How can we get numbers like this??how can i get codes in PHP and JQuery?

How can I develop an alert system like Facebook’s, where User A add User
Share
I presume you want a means of alerting user A, when user B ‘friends’ him/her without requiring a page refresh?
This requires “AJAX”. AJAX stands for Asynchronous Javascript and XML, but this is an overloaded term now-a-days with the actual exchange data structure often using JSON instead of XML. JSON is JavaScript Object Notation. Anyway, the idea is that your webpage–without being refreshed–can make periodic calls to your server to get new or updated information to update the display with. With PHP and jQuery, you’ll want to first set up the AJAX call on your page like this:
This will, every 15 seconds, make a request to your server at the url /check.php on the same domain as the origin of the webpage. The PHP should query your database and and return the number of unread friend requests. Perhaps something like this: