PHP Classes

File: Login.php

Recommend this page to a friend!
  Classes of Ramesh Narayan Jangid   Session Handlers Collection   Login.php   Download  
File: Login.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: Session Handlers Collection
Store PHP sessions in different types of storage
Author: By
Last change: Refactoring
Date: 16 hours ago
Size: 508 bytes
 

Contents

Class file image Download
<?php
include __DIR__ . '/SessionHandlers/Session.php';

// Initialise Session Handler
Session::initSessionHandler('File');

if (isset(
$_POST['submit'])) {
   
$username = $_POST['username'];
   
$password = $_POST['password'];
    if (
verifyCredentials($username, $password)) {
       
$userDetails = getFromDB($username);
       
       
// Start session in normal (read/write) mode.
       
Session::start_rw_mode();
       
$_SESSION = $userDetails;

       
heaeder('Location: dashboard.php');
    }
}