If I remove the action than the data is inserted
This means that the code that inserts the data into the database is on the same page as the form. It's refered to as 'calling the form on itself'. Is there any other code on the form page?
By clicking on the submit button, two things will be happened- 1. data will go to the database, 2. another page will be displayed which I mentioned in the form action.
If you want something to display on the target page it has to be placed on the target page and (usually) be dependent on the results of something, in your instance submitting data to the database. A simple example
'Data successfully added'
'Data wasnt added.'