Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this question <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. This question is off-topic. It is not currently accepting answers.
Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.
Closed 5 years ago.
Improve this question <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>
Share
Improve this question
asked Aug 2, 2019 at 1:17
ikaika
11 silver badge1 bronze badge
1
- you are missing to close brace of while loop. while ($row=mysql_fetch_object($query)) – Chetan Vaghela Commented Aug 2, 2019 at 4:34
1 Answer
Reset to default 1I 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>