/
edit.php
36 lines (31 loc) · 1.13 KB
/
edit.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<?php
/**
* A simple, clean and secure PHP Login Script
*
* ADVANCED VERSION
* (check the website / GitHub / facebook for other versions)
*
* A simple PHP Login Script.
* Uses PHP SESSIONS, modern password-hashing and salting
* and gives the basic functions a proper login system needs.
*
* @package php-login
* @author Panique
* @link https://github.com/panique/php-login/
* @license http://opensource.org/licenses/MIT MIT License
*/
// load php-login components
require_once("php-login.php");
// create a login object. when this object is created, it will do all login/logout stuff automatically
// so this single line handles the entire login process.
//$login = new Login();
// ... ask if we are logged in here:
if ($login->isUserLoggedIn() == true) {
// the user is logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are logged in" view.
include("views/edit.php");
} else {
// the user is not logged in. you can do whatever you want here.
// for demonstration purposes, we simply show the "you are not logged in" view.
//include("views/not_logged_in.php");
}