help with login/redirect page

i am having 2 issues with this page first problem is that i don’t want either message to show until the login button has been selected. Second i am not sure where to put the redirect script i want it to verify username and password are correct and redirect and if not correct to echo the error message here is what i have

[php]

<?php $user=$_POST['user']; $pass=$_POST['pass']; // start authenticate username and password if (($user=="") && ($pass=="")) echo " Access Granted !" ; else echo " Access Denied!"; ?>

Username:

Password:

header( ‘Location: includes/inc_admin.php’ )[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service