Get a message if insert into table works
You can use drupal_set_message() to display a message in the browser, this can be marked as a status', 'warning' or 'error' message.

If you want to debug your code, the Devel module is recommended and provides the dpm() function. Besides being able to print a simple message, dpm() also allows to display an array or object quite easy.