PHP Classes

File: example/logincookieless.php

Recommend this page to a friend!
  Classes of Jorge Castro   Security One Mysql   example/logincookieless.php   Download  
File: example/logincookieless.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Security One Mysql
Implement a login page for users in a MySQL table
Author: By
Last change:
Date: 1 month ago
Size: 648 bytes
 

Contents

Class file image Download
<?php

use eftec\PdoOne;
use
eftec\SecurityOneMysql;

include
"../vendor/autoload.php";

$conn=new PdoOne('mysql',"127.0.0.1","root","abc.123","securitytest","log.txt"); //CREATE SCHEMA `securitytest` ;



try {
   
$conn->connect();

} catch (
Exception $e) {
    die(
"Error :".$e->getMessage());
}

$sec=new SecurityOneMysql($conn,"../lib/");
$sec->useCookie=false;
$sec->whiteList[]='logincookieless.php';
$sec->loginPage='logincookieless.php';
$sec->initPage="frontpage.php";

$sec->validate();

//$sec->createTables();

$sec->loginScreen("It is a login screen","you could change <a href='https://github.com/EFTEC/SecurityOneMysql'>this</a>");