Secure PHP Login
Posted: Fri Mar 04, 2011 1:55 pm
I have a simple php admin login script, which looks something like this:
I just typed that up very quickly, so if its not perfect, you get the idea.
How can I make a more secure login...I DO NOT want to use MYSQL. What's the best way to create a secure login using just PHP?
I have searched around, but there are so many different ideas I dont know which is most effective.
Its not a bank, so I dont need anything crazy, but its not a personal website...something in between would work.
Thanks!
Code: Select all
<?php
if(isset($_POST['submit'])){
$user = $_POST['user'];
$pass = $_POST['pass'];
if($user == "admin" && $pass == "123456"){
Show admin page.
}else{
Incorrect login info.
}
}else{
Show login form.
}
?>
How can I make a more secure login...I DO NOT want to use MYSQL. What's the best way to create a secure login using just PHP?
I have searched around, but there are so many different ideas I dont know which is most effective.
Its not a bank, so I dont need anything crazy, but its not a personal website...something in between would work.
Thanks!