Yes, Headers should always be sent before any page content is output to the browser. That is the way PHP works. If you are simply re-directing to another page after making DB entries then there should be no problems at all, as you don't need to output any page content.
If you use a meta refresh, you are extending the amount of time the script needs to run by having to echo content to the client and wait for the response simply to go to another page, seems rather pointless, why not run the whole process on the server in one go?
Both methods have their place, but for a simple re-direct after running a script on the server, I wouldn't consider using a meta-refresh.