0

So here is my code but I am getting "Parse error: syntax error, unexpected '}', expecting the end of file in C:\xampp\htdocs\Mat\index.php on line 53", I have no clue why anyone can help, please?

<?php
$connect = mysqli_connect('localhost','root','root123','font'); 
$query = 'SELECT * FROM pens order by id ASC';
$result = mysqli_query($connect, $query);
if($result):
if(mysqli_num_rows($result)>0):
while($product = mysqli_fetch_assoc($result)):
?>
<div class="col-lg-12">
<div class="row">
<form method="post" action="index.php?action=add&id=<?php echo product['id']; ?>">
<div class="product">
<div class="col-lg-2">
<h4>FONT <?php echo product['id']; ?></h4>
</div>
<div class="col-lg-8 <?php echo strtok(product['name'], " "); ?>">
</div>
<div class="col-lg-2">
</div>      
</div>
</form>
</div>  
</div>
<?php endwhile; endif; endif; ?>
Gufran Hasan
  • 8,910
  • 7
  • 38
  • 51
RRR
  • 507
  • 4
  • 17

1 Answers1

0

Can you correct your starting php tag? <? php it should be without space.

<?php

Then give it a try.

Himanshu Upadhyay
  • 6,558
  • 1
  • 20
  • 33