Open sodhancha opened 8 years ago
if(mysql_num_rows($result) > 0) { `while ($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" . $row['cust_id'] . "</td>"; echo "<td>" . $row['cust_name'] . "</td>"; echo "<td>" . $row['address'] . "</td>"; echo "<td>" . $row['ph_no'] . "</td>"; echo "</tr>"; } }
Instead do this:
<? if(mysql_num_rows($result) > 0) : while ($row = mysql_fetch_array($result)): ?> <tr> <td> <?= $row['cust_id'] ?></td> <td> <?= $row['cust_name'] ?></td> <td> <?= $row['address'] ?></td> <td> <?= $row['ph_no'] ?></td> </tr> <? endwhile; endif; ?>
thanks a lot.... i'll not embed html inside php from now on...
Instead do this: