title: How can I insert array values from my input box to my table using ajax PHP
body: <p>I have this couple of textbox with arrays which handles the inserting of authors to my table,  Im having a problem on inserting them into my table using ajax , im kinda new on this approach so idk much about converting it.</p>
  
  <pre><code>&lt;input type="text" class="form-control text-center" id="author_lname_add[]" name="author_lname_add[]" placeholder="Last Name" required&gt;
  &lt;input type="text" class="form-control text-center" placeholder="First Name" id="author_fname_add[]" name="author_fname_add[]" required&gt;
   &lt;input type="text" class="form-control text-center" id="author_mname_add[]" name="author_mname_add[]" placeholder="Middle Name / Initial" required&gt;
  </code></pre>
  
  <p>AJAX SCRIPT</p>
  
  <pre><code> $(document).on("click", "#btn_addbook", function(e){
             e.preventDefault();
      var getbook_authorfname = $("#author_fname_add").val();
                   var getbook_authormname = $("#author_mname_add").val();
                   var getbook_authorlname = $("#author_lname_add").val();
      var whatprocess = "ADDBOOK";
                          $.ajax({
                                  url: "adminfunctions.php",
                                  method: "POST",
  
                                  data: {getbook_authorfname:getbook_authorfname ,
                                  getbook_authormname:getbook_authormname, 
                                  getbook_authorlname:getbook_authorlname , 
                                  whatprocess : whatprocess},
  
  
                                  success: function(data) {
                                      var getdata = data.trim();
                                      if (getdata == "SUCCESS") {
                                          swal({
                                                  title: 'Success!',
                                                  text: '',
                                                  type: 'success',
                                                  confirmButtonClass: "btn btn-success",
                                                  buttonsStyling: false
                                              }).then(function() {
  
                                          });
                                      }
                                      else {
                                          swal({
                                              title: 'Sorry for the inconvenience!',
                                              text: "There's a problem. Please contact the technical support for any concerns and questions.!",
                                              type: 'error',
                                              confirmButtonClass: "btn btn-danger",
                                              buttonsStyling: false
                                          }).catch(swal.noop)
                     }
               },
                  error: function(jqXHR, exception) {
                  console.log(jqXHR);
              }
           });
      });
  </code></pre>