I have some input fields and one html table in a form and I want to send all data including all rows from the table to php function in a codeigniter controller. my table data is filled dynamically by using javascript.
<form method="POST" >
<input type="text" class="form-control" id="pname" placeholder="Enter Patient name here" name="pname" >
<input type="number" class="form-control" id="p-age" name="p-age" >
<input type="radio" id="male" name="sex" value="male" >
<label for="male" class="receipt-label mr-2">Male</label>
<input type="radio" id="female" name="sex" value="female" >
<label for="female" class="receipt-label mr-2">Female</label>
<table class="table" id="dest_table" >
<thead class="thead-dark">
<tr>
<th scope="col">Test ID</th>
<th scope="col">Test Name</th>
<th scope="col">Price</th>
<th scope="col" style="text-align:center;">Action</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<button type="submit" name="submit" class="btn btn-info btn-lg" id = "submit">Print</button>
</form>