Inserted a DELETE query to keep only the very last 10 messages in the database.
Added ajax call to refresh last 10 messages displayed to include submitted message.