I have a table that consist of 40 rows. I need to fix my code so that initially one row should appear, and at the end of row i need a button to show the next row and so on.
Currently my code looks like this:
<table align="center" id="dataTable" border=1>
<tr class="header">
<th class='text ce6'><Strong>Product Code</Strong></th>
<th class='text ce6'><Strong>Desc</Strong></th>
<th class='text ce6'><Strong>Qty</Strong></th>
<th class='text ce6'><Strong>Unit</Strong></th>
<?php
for ($i = 1 ; $i < 40 ; $i++)
{ //Loop the table
echo "<select type='select' name='ProductCode";
echo $i;
echo "' id ='ProductCodee' size='1' onchange='GetDesc(this)'> ";
echo "<option value=''>-Select Type-</option>";
for($x = 0; $x<=40; $x++)
{
echo "<option value='";
echo $arrProducts[$x+1];
echo "'>";
echo $arrProducts[$x];
echo "</option>";
$x = $x + 2;
}
echo"</select>";
?>
<td><input size=25 type="text" id="desc" readonly=true/></td>
<td><input size=5 type="number" id="qty" /></td>
<td><input size=5 type="text" id="unit" readonly=true/></td>
<td><INPUT type="button" value="Add Row" onclick="addRow('dataTable')" /</td>
<?php
}
?>
