In our website, after user inserted the input values and hit Go, it will show results. But it’s showing each role. What I am trying to do is, have to show results side by side (Example, Lot ID : Q54497899). I will show the codes as below. I tried to change with if looping and it just only show 1 result.
echo "<table id='corwafer'>";
while ($row = mysqli_fetch_assoc($result1)) {
echo "<tr>";
echo "<th colspan='2'>Lot ID:</th>";
echo "<th colspan='2'>Product:</th>";
echo "<th colspan='3'>EWSFLOW: </th>";
echo "<th colspan='2'>Zone</th>";
echo "</tr>";
$field1name = $row["lotid"];
$field2name = $row["product"];
$field3name = $row["ewsflow"];
$field4name = $row["zone"];
echo '<tr>
<td colspan="2">'.$field1name.'</td>
<td colspan="2">'.$field2name.'</td>
<td colspan="4">'.$field3name.'</td>
<td >'.$field4name.'</td>
</tr>';
}
echo "</table>";
>Solution :
This may not be the best solution but it can be solve with header cells <th> and data cells <td> in one row cell <tr>. Do more research on html table.
echo "<table id='corwafer'>";
while ($row = mysqli_fetch_assoc($result1)) {
$field1name = $row["lotid"];
$field2name = $row["product"];
$field3name = $row["ewsflow"];
$field4name = $row["zone"];
echo "<tr>";
echo "<th colspan='2'>Lot ID:</th>";
echo "<td colspan='2'>'.$field1name.'</td>";
echo "</tr>";
echo "<tr>";
echo "<th colspan='2'>Product:</th>";
echo "<td colspan='2'>'.$field2name.'</td>";
echo "</tr>";
echo "<tr>";
echo "<th colspan='3'>EWSFLOW: </th>";
echo "<td colspan='4'>'.$field3name.'</td>";
echo "</tr>";
echo "<tr>";
echo "<th colspan='2'>Zone</th>";
echo "<td>'.$field4name.'</td>";
echo "</tr>";
}
echo "</table>";

