File: examples/two-step-login/home.php

Recommend this page to a friend!
  Classes of Subin Siby  >  Secure PHP Login System  >  examples/two-step-login/home.php  >  Download  
File: examples/two-step-login/home.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Secure PHP Login System
Register and login users using a database via PDO
Author: By
Last change: Follow PSR standards
Formatted code to follow Francium coding standards

Formatted files using [phpfmt]( to follow Francium [coding standards](
Replace spaces indentation with tabs
Date: 4 years ago
Size: 1,168 bytes


Class file image Download
require 'config.php';
if (isset(
$_POST['newName'])) {
$_POST['newName'] = $_POST['newName'] == '' ? 'Dude' : $_POST['newName'];
'name' => $_POST['newName'],
        <p>You have been successfully logged in.</p>
            <a href="logout.php">Log Out</a>
            You registered on this website <strong><?php echo $LS->joinedSince(); ?></strong> ago.
            Here is the full data, the database stores on this user :
= $LS->getUser();
            Change the name of your account :
        <form action="home.php" method="POST">
            <input name="newName" placeholder="New name" />
            <button>Change Name</button>
            <a href="change.php">Change Password</a>
            <a href="manage-devices.php">Manage Devices</a>

For more information send a message to info at phpclasses dot org.