well, that means you must not have read my post. anything between these lines in your script is not being executed:
PHP Code:
if($_SERVER['REQUEST_METHOD'] == "POST"){
// .. all of the code here is never been executed
}
the request method is only ever "POST" after you've submitted a form. what you're doing is submitting the form (index.php) to another script (login.php) and then redirecting that page back to the form (index.php). once you submit the form, login.php's REQUEST_METHOD is POST. once you redirect from login.php to index.php, the REQUEST_METHOD is back to GET (default). you should be authenticating the user and getting user information in login.php.