First of all - what you're trying to do is pretty interesting - and the result is almost as unpredictable (excuse my lousy english!)
What I'd certainly do would be to break up things :
<?php
if ($username != '' && $password != '') {
// user entered something
if ($username == '1212pta' && $password == 'pta') {
login();
} else {
// deny user access
}
}
?>
.. or perhaps even more nifty :
<?
$username_ok = ($username == '1212pta');
$password_ok = ($password == 'pta);
if ($username_ok && $password_ok) {
login();
} else {
deny();
}
?>
Hope it helps, gives you some ideas of how to use control-structures and boolean operations. And sorry if I'm just wasting your time!? s Happy coding ...