this code worked for a long tome but in an effort to modify I got lost and need some direction.below are the error message and the code:
Parse error: syntax error, unexpected 'calculate_paid' (T_STRING), expecting ',' or ';' in C:\xampp\htdocs\invoice\payment.php on line 63
Code:
<html><head>
<!--when the paidamt is keyed in, the current date,& baldue are autoinserted-->
<script>
function $_(IDS) { return document.getElementById(IDS); }
function calculate_paid() {
   var paidamt = document.getElementById("paidamt");
     var amtdue = document.getElementById("amtdue");
 var datepaid = document.getElementById("datepaid");
                           var dateNow = new Date();   
                     var dayNow = dateNow.getDate();   
var datePaid = (dateNow.getMonth()+1)+"/"+dateNow.getDate()+"/"+dateNow.getFullYear();
            datepaid.value = datePaid;
amtdue.value = parseint(amtdue.value);
if(amtdue > 0.00) 
{ 
amtdue.value = parseint(amtdue.value) - parseint(paidamt.value);
}
</script>
<script type="text/javascript">
window.google_analytics_uacct = "UA-256751-2";
</script>
<script type="text/javascript">
window.google_analytics_uacct = "UA-256751-2";
</script></head><body>
<?php
// error_reporting(0);
error_reporting(E_ALL ^ E_NOTICE);
mysql_connect('localhost','root','');
mysql_select_db('oodb') or die( "Unable to select database");
if(!empty($_POST["submit"]))
{
$acctno = $_POST['acctno'];
$query="SELECT * FROM oocust Where acctno='$acctno'";
$result=mysql_query($query);
if(mysql_num_rows($result))
{
echo "<form action='#' method='post'>Invoice Payment :<br /><br />
<table cellspacing=0 cellpadding=0 border=1>;		
   <tr>		  
<th>acctno</th>
<th>Name</th>		  
<th>Description</th>
<th>checkno</th>
<th>Paid Amt</th>		  
<th>Date Paid</th>
<th>Amt Due</th> 
   "</tr>	
while($row = mysql_fetch_assoc($result))
   {
echo "<tr>
     <td><input type='text' size=25 name='acctno' 'value='" . $row['acctno'] . "'></td>
        <td><input type='text' size=25 name='bname' value='" . $row['bname'] . "'></td>
        <td><input type='text' size=25 name='descr' value='" . $row['descr'] . "'></td>
    <td><input type='text' size=5 name='checkno'  value='" . $row['checkno'] . "'></td>
   <td><input type='text' size=25 id='paidamt' name='paidamt' value='" . 
$row['paidamt'] ."' 
onBlur='calculate_paid(this)'></td>	
 <td><input type='text' id='datepaid' size=7 name='datepaid' value='" . 
$row['datepaid'] . "'></td>
<td><input type='text' id='amtdue' size=25 name='amtdue' value='" . $row['amtdue'] . "'></td>
   	</tr>";	
    }	
echo </table>";	
<input type="submit" name="update" value="Make Payment" />	
</form>";
    }    		
else{echo "No listing for account no. $acctno.<br />Please select another.<br />";}
   }
if(isset($_POST["update"]))
  {	
$sql = "UPDATE oocust SET	
datepaid = '" . mysql_real_escape_string($_POST['datepaid']) . "',  
  paidamt = '" . mysql_real_escape_string($_POST['paidamt']) . "',
    amtdue = '" . mysql_real_escape_string($_POST['amtdue']) . "',
    WHERE acctno='".$_POST["acctno"]."'";
mysql_query($sql) or die("Update query failed: " . mysql_error());
echo "Record for acct# ".$_POST["acctno"]." has been updated";
}
?>
<form method="post" action="#">
<br />
<input type="text" name="acctno"/> <p>
<input type="submit" name="submit" value="select acct#."/>
</form>
<script type="text/javascript"><!--
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
//-->
</script>
<script type="text/javascript"><!--
try {
var pageTracker = _gat._getTracker("UA-256751-2");
pageTracker._trackPageview();
} catch(err) {}
//-->
</script>
<script type="text/javascript"><!--
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
//-->
</script>
<script type="text/javascript"><!--
try {
var pageTracker = _gat._getTracker("UA-256751-2");
pageTracker._trackPageview();
} catch(err) {}
//-->
</script>
</body></html>