Bootstrap 3:使用Modal发布到php

I'm relatively new to php and Bootstrap and i am trying to use a modal to register and add a new user to my database but the information does not seem to be getting posted to the php side. please help me. The following is the registration modal:

                <form class = "form-horizontal" action="index.php" method="post"> 
                    <div class = "modal-header">
                    </div>
                    <div class = "modal-body">
                        <div class = "form-group" >
                            <label for = "user-name" class = "col-lg-2 control-lable">UserName:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "user-name" placeholder = "Username ">
                            </div>
                        </div>

                        <div class = "form-group" >
                            <label for = "password" class = "col-lg-2 control-lable">Password:</label>
                            <div class = "col-lg-10">
                                <input type = "password" class ="form-control" id = "password" placeholder = "Password">
                            </div>
                        </div>  

                        <div class = "form-group" >
                            <label for = "firstname" class = "col-lg-2 control-lable">FirstName:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "firstname" placeholder = "First Name">
                            </div>
                        </div>    

                        <div class = "form-group" >
                            <label for = "othername" class = "col-lg-2 control-lable">OtherName:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "othername" placeholder = "Other Name (If Any)">
                            </div>
                        </div> 

                        <div class = "form-group" >
                            <label for = "lastname" class = "col-lg-2 control-lable">LastName:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "lastname" placeholder = "Last Name">
                            </div>
                        </div>

                        <div class = "form-group" >
                            <label for = "alias" class = "col-lg-2 control-lable">Alias:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "alias" placeholder = "Your Alias">
                            </div>
                        </div>   

                        <div class = "form-group" >
                            <label for = "email" class = "col-lg-2 control-lable">Email:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "email" placeholder = "someone@example.com">
                            </div>
                        </div>

                        <div class = "form-group" >
                            <label for = "city" class = "col-lg-2 control-lable">City:</label>
                            <div class = "col-lg-10">
                                <input type = "text" class ="form-control" id = "city" placeholder = "City">
                            </div>
                        </div>

                        <div class = "form-group" >
                            <label for = "ecountry" class = "col-lg-2 control-lable">Country:</label>
                            <div class = "col-lg-10">
                                <select name = "country" id= "country" >
                                    <option value="Yemen" title="Yemen">Yemen</option>
                                    <option value="Zambia" title="Zambia">Zambia</option>
                                    <option value="Zimbabwe" title="Zimbabwe">Zimbabwe</option>
                                </select>
                            </div>
                        </div>

                    </div>
                    <div class = "modal-footer">
                        <div class = "form-group" >
                        <input class = "btn btn-danger" type = "submit" name = "register" value = "Register">
                        <a class = "btn btn-default" data-dismiss = "modal">Cancel</a>
                    </div>
                    </div>
                    </form>
            </div>
        </div>
    </div>

Please check in console log after clicking the button is it throwing any error or what..If the form is submitted it will be posted to 'action="index.php"' .

Where you are writing the user insertion code?

in index.php just check by printing all the post values like below,u will come to know form is posted or not,

if(isset($_POST)) {
 var_dump($_POST); exit;
}

</div>