Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- require_once('class.php');
- $user = new User();
- if (!$user->isLoggedIn()) {
- header("Location:login_html.php");
- }
- echo "Welcome ".$_SESSION['user']."<br>";
- echo "<a href='redirect.php'>Logout</a> <br>";
- echo "<strong>".$_GET['section']." Section". "</strong><br>";
- echo "<a href=".'post_html.php?section='.$_GET['section'].">Create Topic</a> <br>";
- $sectionid = $user->getSectionId($_GET['section']);
- $topics = $user->getTopics($sectionid);
- if(mysqli_num_rows($topics) > 0){
- while($row=mysqli_fetch_assoc($topics)){
- extract($row);
- $time = date('d-m-Y \a\t h:iA',"$time_submitted");
- echo "<hr> <br>";
- echo "<strong><a href='thread.php?refid=$topicid'>$topic </a></strong><br>";
- echo "By $poster on $time <br>";
- echo "<hr>";
- }
- }
- else{
- echo "No topics created yet";
- }
Add Comment
Please, Sign In to add comment