PHP Classes

File: example/changepassword.php

Recommend this page to a friend!
  Classes of Jorge Castro   Security One Mysql   example/changepassword.php   Download  
File: example/changepassword.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: 27 days ago
Size: 918 bytes
 

Contents

Class file image Download
<?php

use eftec\PdoOne;
use
eftec\SecurityOneMysql;
include
"../vendor/phpmailer/phpmailer/src/PHPMailer.php";
include
"../vendor/phpmailer/phpmailer/src/SMTP.php";
include
"../vendor/eftec/securityone/lib/SecurityOne.php";
include
"../vendor/eftec/bladeone/lib/BladeOne.php";
include
"../vendor/eftec/pdoone/lib/PdoOne.php";
include
"../lib/SecurityOneMysql.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->whiteList[]='changepassword.php';
$sec->initPage="frontpage.php";

$sec->validate();

//$sec->createTables();

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