Parse error: parse error in C:\wamp\www\dani\add_invoice_Item.php on line 75

<?php 
$q=$_GET["q"];

$con = mysql_connect('localhost', 'root', '');
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("dani", $con);

$sql="SELECT * FROM invoice_item_details WHERE itemId = '".$q."'";

$result = mysql_query($sql);

echo "<table border='1'>
<tr>
<th>ItemCode</th>
<th>GoodsDescription</th>
<th>UnitPrice</th>
<th>Quantity</th>
<th>TotalPrice</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";
  echo "<td>" . $row['ItemCode'] . "</td>";
  echo "<td>" . $row['GoodsDescription'] . "</td>";
  echo "<td>" . $row['UnitPrice'] . "</td>";
  echo "<td>" . $row['Quantity'] . "</td>";
  echo "<td>" . $row['UnitPrice']*['Quantity'] . "</td>";
  echo "</tr>";
  }
echo "</table>";

mysql_close($con);
?>

It might help if you noted which line was 75 in your file, since you only posted 38 lines of code.

commented: ha ha ha +14

Try changing

echo "<td>" . $row['UnitPrice']*['Quantity'] . "</td>";

to

echo "<td>" . $row['UnitPrice']*$row['Quantity'] . "</td>";

Thanks Dear to help me :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.