PHP Parse error: syntax error, unexpected '"', expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /home/cg/root/5538730/main.php on line 32
Giving me the above error. And this is my code. Kindly Fix this, Also give me the reason of error. Here is the code.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Exercise</title>
<link rel="stylesheet" href=" ../css/week10Styles.css">
</head>
<body>
<?php
require_once("conn.php");
$ty= $_POST['quantity'];
if(!is_numeric($qty)){
echo "<span>The value entered for the quantity was not a number.</span>";
}else{
$sql = "SELECT * FROM product where quantityInStock > $qty ORDER BY quantityInStock";
$results = $dbConn->query($sql)
or die ('Problem with query: ' . $dbConn->error);
if (!mysqli_num_rows($result)>0) {
echo "<span>There are no products that have more than $qty in stock.</span>;
}else{
?>
<h1>Product with stock > <?php echo $qty;?></h1>
<table>
<tr>
<th>Name </th>
<th>Quantity In Stock</th>
<th>Price</th>
</tr>
<?php
while ($row = $results->fetch_assoc()) { ?>
<tr>
<td><?php echo $row["name"]?></td>
<td><?php echo $row["quantityInStock"]?></td>
<td><?php echo $row["price"]?></td>
</tr>
<?php }}}
$dbConn->close(); ?>
</table>
</body>
</html>