How to show a message to a user?

You could use javascript if you wanted. So wherever the button click is checked, you could add something like this:

<?php
    $message = "Your comment has been submitted";
    echo "<script type="text/javascript">alert('$message');</script>";
?>

That is if it is supposed to happen when they click the button – I might be misinterpreting the question.