Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 450 Bytes

File metadata and controls

23 lines (20 loc) · 450 Bytes

PHP Authentication Library

A simple PHP authentication library.

Example:

// To check if a user is logged in
include('auth.php');
if(!isLoggedIn())
	redirect('/login.php');
	
// super secret PHP code goes here
// To login a user
include('auth.php');
$username = $_POST['username'];
$password = $_POST['password'];
if(login($username, $password))
	redirect('/account.php');
	
echo "Login Unsuccessful";