https://github.com/hkk12369/simple-php-authentication
A Simple Authentication Library For PHP.
https://github.com/hkk12369/simple-php-authentication
Last synced: 2 months ago
JSON representation
A Simple Authentication Library For PHP.
- Host: GitHub
- URL: https://github.com/hkk12369/simple-php-authentication
- Owner: hkk12369
- Created: 2012-09-08T12:31:14.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-09-10T13:44:24.000Z (over 12 years ago)
- Last Synced: 2025-02-03T14:13:07.086Z (4 months ago)
- Language: PHP
- Size: 85.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
PHP Authentication Library
==========================
A simple PHP authentication library.Example:
```php
// To check if a user is logged in
include('auth.php');
if(!isLoggedIn())
redirect('/login.php');
// super secret PHP code goes here
```
```php
// To login a user
include('auth.php');
$username = $_POST['username'];
$password = $_POST['password'];
if(login($username, $password))
redirect('/account.php');
echo "Login Unsuccessful";
```