I am having organization set up with my table. I am trying to code for a report to have the Purchase Date and Shipped Status information added/display onto my report but I continue getting errors such as the value is not showing up and my information look out of place.
I don't know where to put the purchase date ($date) and shipped status ($status) area without making the report table go wacky...all out of place. The report open up in Excel incase anyone was wondering.
I honestly tried and move it around through out the coding still nothing. I even added some <td> tags and nothing still a mess. Could someone please help me out
echo "<table width=\"100%\" cellpadding=\"1\" border=\"1\">\n";
echo "<tr><td colspan=\"6\"><b>Products sold between " . $startdate . " and " . $enddate . "</b></td></tr>\n";
echo "<tr><td><b>Purchase Date</b></td><td><b>Shipped Status</b></td><td><b>Product</b></td><td><b>Quantity Sold</b></td><td><b>Unit price</b></td><td><b>Total</b></td></tr>\n";
$count = 3;
while ($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$product = $row['description'];
$quantity = $row['total'];
$price = $row['price'];
$total = $quantity * $price;
$date = $row['date'];
$status = $row['status'];
echo "<tr><td>$product</td><td>$quantity</td>\n";
printf("<td>%.2f</td><td>=B%s * C%s</tr>\n", $price, $count, $count);
$count++;
}
$count--;
echo "<tr><td><b>Total</b></td><td>=SUM(B3:B" . $count . ")</td><td> </td>\n";
echo "<td>=SUM(D3:D" . $count . ")</td></tr>\n";
echo "</table>\n";