PHP Classes

File: examples/material-design/home.php

Recommend this page to a friend!
  Classes of Subin Siby   Secure PHP Login System   examples/material-design/home.php   Download  
File: examples/material-design/home.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Secure PHP Login System
Register and login users using a database via PDO
Author: By
Last change: Update of examples/material-design/home.php
Date: 4 months ago
Size: 1,595 bytes


Class file image Download
require 'config.php';
if (isset(
$_POST['newName'])) {
$_POST['newName'] = $_POST['newName'] == '' ? 'Dude' : $_POST['newName'];
'name' => $_POST['newName'],
<!DOCTYPE html>
        <?php printHead('Home');?>
<div class="container">
            <p>You have been successfully logged in. You registered on this website <strong><?php echo $LS->joinedSince(); ?></strong> ago.</p>
                Here is the full data that the database stores about this user :
= $LS->getUser();
                <a href="change.php" class="btn pink" data-ajax>Change Password</a>
                <a href="manage-devices.php" class="btn blue" data-ajax>Manage Devices</a>
                Change the name of your account :
            <form action="home.php" method="POST">
                <div class="input-field row">
                    <input name="newName" placeholder="New name" class="col l10" />
                    <button class="btn red col l2">Change Name</button>
                <a href="profile.php?user=<?php echo $LS->userID; ?>" class="btn green">See Your Profile</a>