Please see my comment to the question. The line
header('Location: http://www.hotmail.com');
makes no sense in principle, because this is PHP, something which should generate header on the server side, before HTML or JavaScript, or any other content appears in the HTTP response on the client side. From PHP standpoint, JavaScript is merely a piece of data to be written in response to HTTP request, some content. Even if you put this line in
<?php … ?>
, it still wouldn't make any sense. This is not something which could be somehow "fixed"; it looks like you don't understand generally how server side and client side work.
Also, even the jQuery part of the code is bad: using
document.getElementById
defeats the purpose of jQuery, where you can use selectors instead; please see:
http://api.jquery.com/category/selectors/[
^],
http://api.jquery.com/id-selector/[
^].
It looks like you don't understand what are you writing. Do your try to write something based on some available code samples? Normally, it does not work like that; you need to understand each like you are writing.
—SA