I am trying to send records of my table as form using javascript. I have tried using method below.
I know my foreach function is not capturing the tag. How do I solve it so i can send to php and receive as POST['SHOWTITLE']
<tbody>
  <tr id="0">
    <td class="d-none">
      <input type="text" class="form-control transparent-input" name="1" value="1">
    </td>
    <td>
      <input type="text" class="form-control transparent-input" name="SHOWTITLE" value="The Accidental Astronauts" disabled="">
    </td>
  </tr>
  <tr>
  <td>
    <button onclick="submitRowAsForm(0)" id="btnRoom" class="btn btn-outline-success">Room</button>
  </td>
  </tr>
</tbody>
function submitRowAsForm(id) {
  form=document.createElement('form');
  form.method='POST';
  form.action='orderTicket.php';
  $("#"+id+" td").children().each(function() {
    $(this).clone().appendTo(form);
  });
  document.body.appendChild(form);
  form.submit();
}
 
     
     
    