Author Topic: help with login/redirect page  (Read 92 times)

Shelly

  • Guest
help with login/redirect page
« on: February 03, 2012, 09:50:31 AM »
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 Code: [Select]


<html
<
head
</
head
<
body

 
<?
php
   

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

// start authenticate username and password 
 
if (($user=="") && ($pass=="")) echo " Access Granted !" 
else echo 
" Access Denied!"
 
?> 

<form action='login.php' method='post'> 
<p> Username: <input type='text' name='user'> </p>
<p>Password: <input type='password' name='pass'> </p>
<input type='submit' value='Login'> 
</form>


</body>
</html>

header( 'Location: includes/inc_admin.php' )