You have the form where the action is set to forexample
addentry.php
addentry.php retrieves the content of the for either by a POST or a GET array. addentry.php should not produce any output, just put data in the database.
When data is processed, redirect to anothe page. for example index.php. Use a header redirect.
header("Location: index.php");
What happened is that the user never loads the page that process the form. It's all on the server. That also means that it's impossible to reload the processing code.