It looks like somehow the location header has no effect. I have not encountered this, but my guess would be that you have some kind of webserver or PHP configuration problem, or your webhost is deliberately preventing you from sending location headers via PHP for some inexplicable reason.
EDIT:
When I said "only the following code", I meant it. That is, no "<body>" tags. Nothing else. No blank lines before the "<?php" either. This is to ensure that you do not end up with an error that is misinterpreted as "the location header has no effect". It might not matter if there is output buffering, but this is a precaution.
If you followed by instructions to the letter, there would still be one possibility to eliminate, i.e., a Unicode byte order mark, but if you have this problem I would have expected it to have resulted in a different output for your get_ebooks_form_M.php script.