noordean

thread.php

Sep 29th, 2016
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.60 KB | None | 0 0
  1. <?php
  2. session_start();
  3. require_once('class.php');
  4. $user = new User();
  5. if (!$user->isLoggedIn()) {
  6.     header("Location:login_html.php");
  7. }
  8. $posts = $user->getPosts($_GET['refid']);
  9. echo "Welcome ".$_SESSION['user']."<br>";
  10. echo "<a href='redirect.php'>Logout</a> <br>";
  11. while ($row=mysqli_fetch_assoc($posts)){
  12.     extract($row);
  13.     $time = date('d:m:Y \a\t h:iA',$time_submitted);
  14.     echo "<hr>";
  15.     echo "$poster $time <br>";
  16.     echo "<strong>$post </strong><br>";
  17.     echo "<a href='#'>Quote</a>   <a href='#'>Like</a>";
  18.     echo "<hr> <br>";
  19. }
  20. echo "<a href=".'reply_html.php?refid='.$_GET['refid'].">Reply</a>";
Add Comment
Please, Sign In to add comment