0

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);
?>
3
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by daniahmed
1

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

Votes + Comments
ha ha ha
1

Try changing

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

to

echo "<td>" . $row['UnitPrice']*$row['Quantity'] . "</td>";
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.