I'd have to try it to be sure, but my first guess is that it would be. However, I don't see a benefit in putting it in at all if the default behavior for nothing there is to submit the page to...
If your PHP script is supplying the header, the web server won't "take over" and pull the error message for you. It assumes that the script will handle it.
By the way, don't use PHP_SELF in your FORM's ACTION tags. It's a security vulnerability. Just leave the action tag blank ( <form action="" method="get"> )
After you try to get the record from the database, see if it contains any data. If not, send the 404 error code with the header() function. If it does contain data, display your page.