How do you make a simple login script?
I want to be able to make a very simple login script it doesn’t have to have more that one user. It justs redirects you to a page that won’t be shown unless put password in. Making it secure is needed aswell. How do you make this?
<form method=post>
<input type=text name=username>
<input type=password name=password>
<input type=submit name=action>
</form>
<?php
$user = ‘admin’;
$pass = ‘secret’;
if ($_post['action']) {
if ($user == $_post['username'] && $pass == $_post['password']) {
header("Location: index.php?or_whereever_you_want_it_to_be");
}
}
?>