title: Notification when new data is inserted into table
body: <p>I'm working on an e-commerce website, Currently got stuck at the point where I have a contact form where customers fill in their details and send it and data will be stored into the table called messages.</p>
  
  <p>Now I have a page messages page fetching all the messages from database where site admin can see the messages
  I want to show notification on messages  li that they got a new message</p>
  
  <pre><code>&lt;li&gt;&lt;a href="messages.php"&gt;Messages&lt;/a&gt;&lt;/li&gt;
  </code></pre>
  
  <p>How do I do that?</p>
  
  <p>here is all code</p>
  
  <pre><code>     $presults = $db-&gt;query("SELECT * FROM messages ORDER BY DATE DESC"); 
  
      &lt;h2 class="text-center"&gt;Messages&lt;/h2&gt;
  &lt;div class="clearfix"&gt;&lt;/div&gt;
  &lt;hr&gt;
  
  &lt;table class="table table-bordered table-condensed table-striped"&gt;
       &lt;thead&gt;
            &lt;th&gt;&lt;/th&gt;
            &lt;th&gt;Name&lt;/th&gt;
            &lt;th&gt;Email&lt;/th&gt;
            &lt;th&gt;Subject&lt;/th&gt;
            &lt;th&gt;Date Received&lt;/th&gt;
            &lt;th&gt;message&lt;/th&gt;
       &lt;/thead&gt;
       &lt;tbody&gt;
            &lt;?php 
                 while($product = mysqli_fetch_assoc($presults)) : ?&gt;
            &lt;tr&gt;
                 &lt;td&gt;
                      &lt;a class="btn btn-xs btn-default" href="messages.php?delete=&lt;?php echo $product['id']; ?&gt;"&gt;&lt;span class="glyphicon glyphicon-remove"&gt;&lt;/span&gt;&lt;/a&gt;
                 &lt;/td&gt;
                 &lt;td&gt;&lt;?php echo $product['name']; ?&gt;&lt;/td&gt;
                 &lt;td&gt;&lt;?php echo $product['email']; ?&gt; &lt;/td&gt;
                 &lt;td&gt;&lt;?php echo $product['subject']; ?&gt; &lt;/td&gt;
                 &lt;td&gt;&lt;?php echo $product['date']; ?&gt; &lt;/td&gt;
                 &lt;td&gt;&lt;?php echo $product['message']; ?&gt;&lt;/td&gt;
            &lt;/tr&gt;
            &lt;?php endwhile; ?&gt;
       &lt;/tbody
  </code></pre>