<commit_before><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Date: 4/20/2017
 * Time: 9:42 PM
 */

create_new_post();
?>

<form action="" method="POST" enctype="multipart/form-data">
    <div class="form-group">
        <label for="post_title">Post Title</label>
        <input type="text" class="form-control" name="post_title">
    </div>
    <div class="form-group">
        <label for="post_category_id">Post Category</label>
        <input type="text" class="form-control" name="post_category_id">
    </div>
    <div class="form-group">
        <label for="post_status">Post Status</label><commit_msg>Section 14 - Lecture 117<commit_after><?php
/**
 * Created by PhpStorm.
 * User: <NAME>
 * Date: 4/20/2017
 * Time: 9:42 PM
 */

create_new_post();
?>

<form action="" method="POST" enctype="multipart/form-data">
    <div class="form-group">
        <label for="post_title">Post Title</label>
        <input type="text" class="form-control" name="post_title">
    </div>
    <div class="form-group">
        <label for="post_category_id">Post Category</label>
        <select class="form-control" name="post_category_id">
            <?php
            $query = "SELECT * FROM categories";
            $select_all_categories = mysqli_query($connection, $query);
            check_query($select_all_categories);

            while($row = mysqli_fetch_assoc($select_all_categories)) {
                $cat_id = $row['cat_id'];
                $cat_title = $row['cat_title'];

                echo "<option value='$cat_id'>{$cat_title}</option>";
            }
            ?>
        </select>
    </div>
    <div class="form-group">
        <label for="post_status">Post Status</label>
{'fraction_non_alphanumeric': 0.1704009433962264, 'fraction_numerical': 0.01474056603773585, 'mean_word_length': 2.865603644646925, 'pattern_counts': {'":': 0, '<': 39, '<?xml version=': 0, '>': 39, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4802350', 'n_tokens_mistral': 566, 'n_tokens_neox': 536, 'n_words': 102}