The below code works correctly except that the totals don’t align correctly on the page and the totcharges doesn’t display the decimals. Can someone tell me what I’m doing wrong?
[php]<?php
mysql_connect(localhost,root,"");
mysql_select_db(oodb) or die( “Unable to select database”);
$query=" SELECT * FROM oocust WHERE payrec = ‘R’ AND pd = ’ '";
$result=mysql_query($query);
$num=mysql_numrows($result);
echo date(“m/d/Y”) . “
”;
echo " Old Orchard Plumbing Invoices Due Report
";
echo "
order | ||||||
---|---|---|---|---|---|---|
Inv# | Customer | date | days late | Charges | tax | Owed |
======================================================================= | ||||||
" . $row['invnum'] . " | "; echo "" . $row['bname'] . " | "; echo "" . $row['dateord'] . " | "; echo "" . $row['dayslate'] . " | "; echo "" . $row['charges'] . " | "; echo "" . $row['tax'] . " | "; echo "" . $row['amtdue'] . " | "; echo "
======================================================================= | |||||||
---|---|---|---|---|---|---|---|
Totals Due | "; echo ". | "; echo ". | "; echo ". | "; echo ". | ";$totcharges | ”;$tottax | ”;$totamtdue | ”;
mysql_close();
?> [/php]