<?php
include("../connection.php");
include("../user.php");
$category=$_REQUEST['category'];
$cat_detail=mysqli_query($con,"select id from category_master where category='$category'");
$cat_id=mysqli_fetch_array($cat_detail);
$cat_no=$cat_id['id'];
$tot_qty=$_REQUEST['qty'];
$category_id=$_REQUEST['data'];
$cat_query=mysqli_query($con,"SELECT cm.configuration,ct.category FROM `configuration_master` as cm left join config_detail as cd on cm.id=cd.config_detail left join category_master as ct on cd.category_name=ct.id where cd.category_name='$cat_no'");

 $count=mysqli_num_rows($cat_query);


	 
?>
<table id="categ" class="table table-striped" style="text-transform:upper;" >
		<thead>
		<tr>
		<input type="hidden" name="cat_id1" id="cat_id" value="">
		<input type="hidden"  class="form-control" name="header[]" id="header"/>
		<?php
		while($confi_query=mysqli_fetch_array($cat_query))
		{
		?>
		
		<th><?php echo $confi_query['configuration']; ?></th>
		<input type="hidden" name="configuration[]" value="<?php echo $confi_query['configuration']; ?>"/>
		<?php 
		}
		?>
		</tr>
		</thead>
		<tbody>
		<?php for($i=1;$i<=$tot_qty;$i++)
		{?>
		<tr>
		<input type="hidden" class="form-control" name="counter_tr[]" id="count_<?php echo $i; ?>"/>
	<?php  for($j=1;$j<=$count;$j++)
	{ ?>
	<td><input type="text"  class="form-control" name="confie[]" id="confi_<?php echo $j; ?>" autocomplete="off"/>
	</td>
	<?php } ?>
		</tr>
		<?php } ?>
		</tbody>
</table>

