File: examples/material-design/profile.php

Recommend this page to a friend!
  Classes of Subin Siby  >  Secure PHP Login System  >  examples/material-design/profile.php  >  Download  
File: examples/material-design/profile.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:
Date: 4 years ago
Size: 1,850 bytes


Class file image Download
require 'config.php';

if (isset(
$_GET['user']) && is_numeric($_GET['user']) && $LS->userIDExists($_GET['user'])) {
$uid = $_GET['user'];
} else if (
$LS->isLoggedIn()) {
$uid = $LS->getUser('id');
} else {

$userInfo = $LS->getUser('*', $uid);
<!DOCTYPE html>
        <?php printHead('Home');?>
<div class="container">
list($firstName) = explode(' ', $userInfo['name']);
$emailDomain) = explode('@', $userInfo['email']);

'<h1><a href="profile.php?user=' . $uid . '" data-ajax>' . $firstName . '</a></h1>';

            if (
$LS->isLoggedIn() && $uid === $LS->getUser('id')) {
'<p><i>This is you.</i></p>';
<table class="striped">
                        <td>@<?php echo $userInfo['username']; ?></td>
                        <td>Full Name</td>
                        <td><?php echo $userInfo['name']; ?></td>
                        <td>Email Domain</td>
                        <td><?php echo $emailDomain; ?></td>
                        <td colspan="2" class="center">Member For <?php echo $LS->joinedSince($uid); ?>.</td>

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