<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-header bg-transparent">
                <div class="row align-items-center">
                    <div class="col">
                        <h6 class="text-uppercase text-muted ls-1 mb-1">New Article</h6>
                    </div>
                </div>
            </div>
            <div class="card-body">
                <form action="" method="post" enctype="multipart/form-data">
                    <div class="form-group mb-3">
                        <label for="">Title</label>
                        <input type="text" name="title" required class="form-control">
                    </div>
                    <div class="form-group mb-3">
                        <label for="">Image</label>
                        <input type="file" name="file" class="form-control">
                    </div>
                    <div class="form-group mb-3">
                        <label for="">Content</label>
                        <textarea id="textEditor" name="content" required class="form-control"></textarea>
                    </div>
                    <button type="submit" name="submit" class="btn btn-success">Submit</button>
                </form>
                <?php
                    if (isset($_POST['submit'])){
                        $use->store($_POST['title'],$_POST['content'],$_FILES['file']);
                        echo "<script>location='./?page=articles'</script>";
                    }
                ?>
            </div>
        </div>
    </div>
</div>