<title> 
			<?php 
echo Data_display::show_thread_title($conn);
?>
 
		</title>
	</head>
</html>

	<?php 
if (isset($_GET["thread_id"]) and isset($_GET["cat_id"])) {
    $Thread_editor = new Thread_editor($conn);
    //shows whole thread info, like thread body, title, thread by and time.
    $Show_thread_body = new Data_display($conn);
    //show thread body.
    $Show_thread_body->show_thread_body();
    //show thread replies.
    $Show_thread_body->show_replies();
    //code below only runs if user is logged in.
    if ($Thread_editor->is_user_logged_in("logged_in")) {
        //***************************************************************************//
        //*****************TAKES CARE OF SHOWING REPLY OPTIONS***********************//
        //***************************************************************************//
        //do these if only is user if logged in. this also shows the form to reply if user if logged in.
        $Post_reply = new reply($conn);
        $Post_reply->show_form();
        //takes care of making sure user is logged in. thread_id and cat_id variables exist, reply length and empty reply...
        if ($Post_reply->set_reply()) {
            $Post_reply->post_reply();
        }
        //***************************************************************************//