Do the code if there's a new record in the database.
The code on the php is to be met if there's a new record in mysql's database. Google's on the case. The code is a flashing notification. There is an example of an emerging notice codepen.io/anon/pen/hCwyv. Tell me what means I'm gonna check on the new record in the bud.
Ajax technology has long been made for this. To make it easier for you to understand, I'll tell you that you can check your flag. Good luck.