In my MVC framework I sometimes redirect after form submission. Say you post a form to /example/input.

I want to add the proper header code and explanatory text in PHP with e.g. `header('HTTP/1.1 404 Not Found');`

1) Your input contains errors. You stay on the /example/input page and get the form again, marked up with errors etc. Which HTTP 1.1. code and text would be the proper one to send with this the redirect instruction?

2) Your input is ok, the element is saved, and you are redirected via `Header('Location: ...')` to /example/success. Which HTTP 1.1. code and text would be the proper one here?

3) The PHP code throws an error due to misconfiguration, missing include file, corrupt database connection, or whatever else is going wrong sometimes. Which HTTP 1.1. code and text would be the proper one here?

I have looked at the codes here: <http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html>
Number 200 appears right for 1), while number 301/302 appear right for 2), and number 500 for 3). But in all three cases, I find that the title/explanation following the codes on the link above is not exactly fitting the scenario I'm describing above. Should I choose other codes/text?