If I want to create a page with a password access what sort of code I need to get to another page when the password is correct?
this code is incomplete somehow
<?php
$username = $REQUEST['username'];
$password = $REQUEST['password'];
$PHP_SELF = $_SERVER['PHP_SELF'];
if($username == 'alex' and $password == 'secret')
$authorized = true;
?>
<?php if (!$authorized): ?>
<!--Unauthorised users are prompted for their credetials-->
<p> Please Enter Your Username and Password:<p>
<form action ="<?=$PHP_SELF?>" method ="POST">
<p>Username: <input type="text" name="username" /><br />
Password: <input type="password" name="password" /><br />
<input type="submit"/></p>
<a href="http://localhost/public/access_granted.html"></a>
</form>
<?php else: ?>
<?php endif; ?>