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>";
- if(isset($_POST['submit'])){
- if(!empty($_POST['message'])){
- $message = $user->escapeInput($_POST['message']);
- if($user->insertPost($message,$_SESSION['user'],$_GET['refid'])){
- header("Location:thread.php?refid=".$_GET['refid']);
- }
- }
- else{
- echo "<p style='color:red'>Insert the your reply</p>";
- }
- }
Add Comment
Please, Sign In to add comment