예제 #1
0
//checks whether the session has been started
if (!$user->loggedin()) {
    //if not, redirects to login.php
    $user->redirect('login.php');
}
//session == userID
$userID = $_SESSION['user_session'];
//will be used to implement proper user profiles in the future
$stmt = $conn->prepare("SELECT * FROM user WHERE userID=:userID");
$stmt->execute(array(":userID" => $userID));
$userRow = $stmt->fetch(PDO::FETCH_ASSOC);
?>

<header>
	<div class="feat">
		<h1 class="dashboard">Here are your posts,
			<?php 
echo $userRow['email'];
?>
!</h1>

		</div>
	</header>
	<!--own posts display-->
	<div class="post">
		<?php 
$user->ownPosts($userID);
?>
	</div>
	<?php 
include_once 'include/footer.php';