Hi guys, help me with my little coding problem. please.
I key in “localhost/invoice/apdue.php” and get desired
apdue.php results below:
9/28/13 Accounts payable Report ; due days acct# customer description date late charges paid due =================================================================== 0 Caromont Medical Group. remove, ear wax 2013-02-08 0 259.52 259.52 0.00 0 Homesteaders Life Co. funeral arrangment 2013-01-13 0 72.99 0.00 72.99 0 OrthoCarolina shoulder repair 2013-02-08 0 468.47 100.00 368.47 0 Presbyterian Hospital 2013-02-08 0 568.57 100.00 468.47 0 Time Warner Cable intetrnet service 2013-02-03 0 108.54 108.54 0.00 0 Boost Mobile phone bill 2013-01-26 0 40.00 0.00 40.00 0 Boost Mobile phone bill 2013-01-17 0 50.00 0.00 50.00 ===================================================================== Gtotals 1568.09 568.06 999.93
but when trying to open apdue.php via the below (invoicenav.html), that should open
the apdue.php:,
[code]
| Payables Due |
| Payables Paid |
| Receivables Due |
| Receivables paid |
I get the below:
Object not found! The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again. If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.4 (Win32) OpenSSL/0.9.8y PHP/5.4.16Below is the aforementioned [b]apdue[/b].php: [/quote] [php]<?php error_reporting(0); mysql_connect('localhost','root',''); mysql_select_db('oodb') or die("Unable to select database"); $query=" SELECT * FROM oocust WHERE payrec = 'P' && pd = ' '"; $result=mysql_query($query); $num=mysql_numrows($result); echo date('m/d/y'); echo " Accounts payable Report
"; echo "; "; while($row = mysql_fetch_array($result)) { $totcharges = $totcharges + $row['charges']; $totdue = $totdue + $row['amtdue']; $totpaid = $totpaid + $row['paidamt']; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo ""; echo ""; echo ""; echo ""; echo "";
echo “
”;echo “”;
echo “”;
echo “”;
echo “
| due | days | |||||||
|---|---|---|---|---|---|---|---|---|
| acct# | customer | description | date | late | charges | paid | due | |
| =================================================================== | ||||||||
| " . $row['acctno'] . " | " . $row['bname'] . " | " . $row['descr'] . " | " . $row['duedate'] . " | " . $row['dayslate'] . " | " . $row['charges'] . " | " . $row['paidamt'] . " | " . $row['amtdue'] . " | |
| ===================================================================== | ||||||||
| Gtotals | ” . sprintf(“%.2f”,$totcharges) . “ | ” . sprintf(“%.2f”,$totpaid) . “ | ” . sprintf(“%.2f”,$totdue) . “ | |||||
mysql_close();
?>[/php]