使用模式表单更新SQL

I am making a Modal Form that pops up on Click of a button and opens up a input field. On Save it pushes the values to webpage URL that it is poping up from. I am trying to capture that value and update on the database. Which is happening perfectly fine. But I want to refresh the page as the URL still holds the value for from the Modal form.

<div id="custom-modal" class="modal-demo">
        <button type="button" class="close" onclick="Custombox.close()"><span>&times;</span><span class="sr-only">Close</span></button>
            <h4 class="custom-modal-title">Add New Category</h4>
                <div class="custom-modal-text text-left">
                    <form role="form">
                        <div class="form-group" method="post">
                            <label for="name">Category Name</label>
                                <input type="text" class="form-control" id="cat_name" name="cat_name" placeholder="Enter category name">
                        </div>
                        <button type="submit" class="btn btn-default waves-effect waves-light" name="btn-savecat" id="btn-savecat">Save</button>
                        <button type="button" class="btn btn-danger waves-effect waves-light m-l-10">Cancel</button>
                        <?php
                        if(isset($_GET['cat_name']))
                                    {   
                                        try
                                            {
                                                    $id=$_GET['cat_name'];
                                                    $result = $DB_con->prepare("INSERT INTO category(cat_name,cat_status) 
                                                    VALUES(:userid,'Active')");
                                                    $result->bindParam(':userid', $id);
                                                    $result->execute();


                                            }
                                        catch(PDOException $e)
                                            {
                                                echo $e->getMessage();
                                            }                                           
                                    }   
                        ?>

                    </form>
        </div>

I think you should be able to do it with new HTML5. There is an option for rewriting url without reloading the page. You cannot however change the domain name for security reasons. Look up history api. I think it would be something like the following:

history.replaceState("object or string", "title", "/another-new-url");

Check this one out.