Create a new thread

'; if (!isset($_SESSION['signed_in'])) { die('You must be signed in to create a thread.'); } ?>
" method="post">


'; while ($row = mysqli_fetch_assoc($result)) { echo ''; } echo '
'; ?>

Thread subject cannot be empty.'; } else { create_thread($dbc, $thread_subject, $thread_cat, $user_id); $thread_id = mysqli_insert_id($dbc); $post_result = create_post($dbc, $post_content, $thread_id, $user_id); if (!$post_result) { echo 'An error occurred creating your post: ' . mysqli_error($dbc); } else { header("Location: thread.php?id=" . $thread_id); } } } ?>