how can I make the questions go to the database [closed]

So I’m working on a project of my senior he left the company and the owner has distributed his projects among juniors and I’ve also gotten one.

Now in this project admin is able to create new services form admin panel and they have asked me to add the area above it from where the admin can add questions for the service I’ve made the add question section =>

enter image description here

Actually I copied this from the other part of the code from where admin can edit / update the service :p But I’m not able to get these questions into the database can anyone please provide me with the proper solution on how can I achieve it?

here’s the code of it =>

<form action="#" method="post" enctype="multipart/form-data">
            <div class="row" style="margin-top: 20px; margin-left: 5px;margin-right: 5px">
               <div class=col-sm-3>
                    <div class="form-group mb-10">
                        <label>Service Category :<span style="color:red"></span></label>
                        <select class="form-control" name="category" required="required">
                          <?php $service=mysqli_query($con,"SELECT `id`, `cast` FROM `cat` ORDER BY `cast` ASC");while($runservice=mysqli_fetch_array($service)){?>
                            <option value="<?php echo $runservice['id']; ?>"><?php echo ucwords($runservice['cast']); ?></option>
                          <?php }?>
                        </select>
                    </div>
                </div>
            <div class=col-sm-6>
                    <div class="form-group mb-10">
                        <label> Service Name<span style="color:red">*</span></label>
                        <input type="text" class="form-control" name="name" maxlength="225" required placeholder="Enter Here" />
                    </div>
                </div>
                <div class=col-sm-3>
                    <div class="form-group mb-10">
                        <label> Service Cost<span style="color:red">*</span></label>
                        <input type="text" pattern="[0-9]+" class="form-control" name="servicecost" maxlength="10" required placeholder="Enter Here" />
                    </div>
                      <div class="form-group mb-10">
                        <label>Distribution Amt<span style="color:red">*</span></label>
                        <input type="text" pattern="[0-9]+" class="form-control" name="cashback" maxlength="10" required placeholder="Enter Here" />
                    </div>
                </div>
                <div class=col-sm-5>
                    <div class="form-group mb-10">
                        <label> Advance Required </label>
                       <select class="form-control" name="advance">
<option value="yes">Yes</option>
<option value="no">No</option></select>
                    </div>
                </div>
                <div class=col-sm-4>
                    <div class="form-group mb-10">
                        <label>Advance Percentage <small>(Fill Number only)</small></label>
                        <input type="text" pattern="[0-9]+" class="form-control" name="advancepercentage" placeholder="Enter Here"/>
                    </div>
                </div>
                <div class=col-sm-4>
                    <div class="form-group mb-10">
                        <label>Service Due Days (Fill Number only)</label>
                        <input type="text" pattern="[0-9]+" class="form-control" name="serviceduedays" placeholder="Enter Here" />
                    </div>
                </div>
                <div class=col-sm-4>
                    <div class="form-group mb-10">
                        <label>Payment Due Days (Fill Number only)</label>
                        <input type="text" pattern="[0-9]+" class="form-control" name="paymentduedays" placeholder="Enter Here" />
                    </div>
                </div><div class=col-sm-3>
                    <div class="form-group mb-10">
                        <label>Image</label>
                       
                       <input type="file" name="pic">
                    </div>
                </div>
<div class=col-sm-12></div>
                <div class=col-sm-4>
                    <div class="form-group mb-10">
                        <label>Service Type</label>
                <select class="form-control" name="servicetype">
<option value="onetime">One Time</option>
<option value="recurrent">Recurrent</option>
</select>
                    </div>
                </div>
                <div class=col-sm-8>
                    <div class="form-group mb-10">
                        <label>Required Documents:<span style="color:red"></span></label>
    <select class="form-control select2" multiple="multiple" data-placeholder="Select Documents"
                        style="width: 100%;" name="documents[]" id="documentlist"> 
<?php
$dcs=mysqli_query($con,"SELECT `name`, `type`FROM `documentlist` ORDER BY `name` ASC");while($doctsrun=mysqli_fetch_array($dcs)){?>
<option value="<?php echo ucwords($doctsrun['name']); ?>"><?php echo ucwords($doctsrun['name']); //echo ucwords($doctsrun['type']);?></option>
<?php }?></select></div>
                    <div id="result"></div>
                </div>
              </div>
                  
              <!-- Dynamic Questions From Admin -->
                <strong> Add Form Questions <button id="rowwAdder" width="50%" type="button" class="btn btn-dark">
                  <span class="bi bi-plus-square-dotted">
                    </span> <i class="fa fa-plus"></i>
                  </button></strong>
                  <div class="">
                    <div id="newinput"></div>
                    <?php
            $in_question = mysqli_query($con, 'INSERT INTO form_question (question, cat_id, service_id)VALUES("'.$question.'","'.$category_id.'", "'.$service_id.'")');?>

                    <div align="center" style="padding-top:3%;"> <input type="submit" class="btn btn-info" name="submit"></div>
        </form>

and here’s the js code of it which is loading the input field for adding the question on button click =>

$("#rowwAdder").click(function () {
  newRowAdd = '<div id="row"> <div class="input-group m-3">' + '<div class="input-group-prepend">' 
  + '<button class="btn btn-danger" id="DeleteRow" type="button">' +
    '<i class="fa fa-remove"></i></button> </div>' +
    '<input type="text" class="form-control m-input " name="multi_question[]" style="width:1215px;"> </div> </div>';

  $('#newinput').append(newRowAdd);
});
$("body").on("click", "#DeleteRow", function () {
  $(this).parents("#row").remove();
})

if you need any more clearness or want me to post the whole code of this page please let me know I’m here its 706 lines long.