Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include('functions.php');
- if (!isLoggedIn()) {
- $_SESSION['msg'] = "You must log in first";
- header('location: login.php');
- }
- require_once 'dbcon.php';
- ?>
- <?php
- $stmt = $DB_con->prepare('SELECT id, username, description, userprofile FROM users ORDER BY id DESC');
- $stmt->execute();
- if($stmt->rowCount() > 0)
- {
- $row=$stmt->fetch(PDO::FETCH_ASSOC);
- extract($row);
- }
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title> Home</title>
- </head>
- <body>
- <!-- logged in user information -->
- <div class="profile_info">
- <img src="uploads/<?php echo $row['userprofile']; ?>" class="img-rounded" width="250px" height="250px" />
- <div>
- <?php if (isset($_SESSION['user'])) : ?>
- <strong><?php echo $_SESSION['user']['username']; ?></strong>
- <small>
- <i style="color: #888;">(<?php echo ucfirst($_SESSION['user']['user_type']); ?>)</i>
- <br>
- <a href="home.php?logout='1'" style="color: red;">logout</a>
- </small>
- <h4> Status: <?php echo $description ?> </h4>
- <?php endif ?>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- </html>
Add Comment
Please, Sign In to add comment