[PHP] Form Variables

Psuedo code:


$user = $_POST['user'];
$password = $_POST['password'];

if((!$user) or (!$password))
{
   // form code
   // action = self
}
else
{
   // check database for match
   // reload page if no match
}

When this page first loads, it will only run the “if” code. On the first try, a user fills out both fields so the page reloads and then runs the “else” code. He fails to provide a valid username and password, so the page reloads a second time. On this second reload, will $user and $password be null?

I’m having the problem that on the second reload, those variables appear to not be null, so NO code is run at all!