-3
              <tr>
                <?php include('sql_connect.php'); ?>
              <?php
                $sql="select * from hp";
                $query=mysql_query($sql);

               if(mysql_num_rows($query)>0)
                { ?>
                  $i=1; 
                   while ($row=mysql_fetch_object($query)
                   {


                    <th scope="row"><input type="checkbox" /></th>
                    <td class="tm-product-name"><?php echo $hp_model; ?></td>
                    <td><?php echo $hp_type; ?></td>
                    <td><?php echo $hp_colour; ?></td>
                    <td><?php echo $hp_ds; ?></td>
                    <td><?php echo $hp_price; ?></td>

                  <?php } } ?>

                <td>
                  <a href="#" class="tm-product-delete-link">
                    <i class="far fa-trash-alt tm-product-delete-icon"></i>
                  </a>
                </td>
              </tr>

closed as off-topic by nmr, fuxia Aug 2 at 9:13

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

  • you are missing to close brace of while loop. while ($row=mysql_fetch_object($query)) – Chetan Vaghela Aug 2 at 4:34
1

I have updated your code here. so use this below code. you have forgot close this ) in this line like this while ($row=mysql_fetch_object($query))

<tr>
  <?php include('sql_connect.php'); ?>
  <?php
    $sql="select * from hp";
    $query=mysql_query($sql);
   if(mysql_num_rows($query)>0)
    {
      $i=1; 
       while ($row=mysql_fetch_object($query)){ ?>
        <th scope="row"><input type="checkbox" /></th>
        <td class="tm-product-name"><?php echo $hp_model; ?>
  </td>
  <td><?php echo $hp_type; ?></td>
  <td><?php echo $hp_colour; ?></td>
  <td><?php echo $hp_ds; ?></td>
  <td><?php echo $hp_price; ?></td>
  <?php } } ?>
  <td><a href="#" class="tm-product-delete-link"> <i class="far fa-trash-alt tm-product-delete-icon"></i> </a></td>
</tr>

Not the answer you're looking for? Browse other questions tagged or ask your own question.