Or use ajax to insert data via a separate php file and show the message on return of the ajax response.
You can take the advantage of jQuery. Ofcourse it might possible with only with jQuery or ajax.
So follow the steps.
Create a PHP page that can able to search the database for the new post.
Use some interval to call a function the function contains $('#result').load('ajax/updates.php'); WHere #result will be the popup div or something and updates.php is a php page which you created in the step 1.
Simple that will display the results how u want. Comments are weclome for this idea.