Hi, I could use a little help w/syntax. Following is my code. I get the
message "invalid entry" BEFORE I select (the entry is valid). The display
is what I want but I don't understand the error? See screenshot#1

Click image for larger version. 

Name:	payerr1.jpg 
Views:	244 
Size:	10.8 KB 
ID:	5479

If I go ahead and submit I get further error? See screenshot#2.

Click image for larger version. 

Name:	payerr2.jpg 
Views:	272 
Size:	14.6 KB 
ID:	5480

HTML Code:
<html><head>        
<!--when the paidamt is keyed in, the current date & paid code are autoinserted-->
<script type="text/javascript" src/="payment.js"></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><b><center>
PHP Code:
<?php
// error_reporting(0);
error_reporting(E_ALL E_NOTICE);
    
$con=mysqli_connect("localhost","root","cookie","homedb");
    
//============== check connection
    
if(mysqli_errno($con))
    {echo 
"Can't Connect to mySQL:".mysqli_connect_error();}
    else
    {echo 
"Connected to mySQL</br>";}
    if(isset(
$_POST['acctno']))
  {
$acctno $_POST['acctno'];
$recur $_POST['recur'];
$pd$_POST['pd'];
$p
ayrec 
$_POST['payrec'];
$bname $_POST['bname'];
$datepaid $_POST['datepaid'];
$purpose $_POST['purpose'];
$paidamt $_POST['paidamt'];
$amtdue$_POST['amtdue'];
$fetch="SELECT acctno,
recur, 
pd,
payrec,
bname,
datepaid,
purpose,
paidamt,
amtdue    
FROM oocust WHERE acctno = '"
.$acctno."'";
    
$result mysqli_query($con,$fetch);
    if(!
$result)
    {echo 
"Error:".(mysqli_error($con));}
 echo 
date('m/d/y');
  echo 
"<br /><font size=+1><b><center> Invoice Payment :</font><br />";
?>  
<form action='#' method='post'>:<p>
<table cellspacing=0 cellpadding=0 border=1>
<th bgcolor="#ffffff"colspan=3></th> 
<th bgcolor="##7FFFAA" colspan=6>Edit fields</th>
<tr>         
<th bgcolor="#ffffff" colspan=3></th>
<th bgcolor="#FFAA7F" colspan=3>Amount</th>
<th bgcolor="#ccffff">Date</th>
<th bgcolor="##7FFFAA"></th>
<tr>  
<th bgcolor="#ccccff">Acct#</th>
<th bgcolor="#ccccff">Name</th>          
<th bgcolor="#ccccff">Descr</th>
<th bgcolor="#FFAA7F">Pay</th>
<th bgcolor="#FFAA7F">Due</th>
<th bgcolor="#FFAA7F">Paid</th>
<th bgcolor="#ccffff">Paid</th>
<th bgcolor="#ccccff">Pd?</th>
   </tr>
<?php
while($row=mysqli_fetch_array($query))
   {
echo 
"<tr>
<td><input type='text' readonly size=15 name='acctno' value='" 
$row['acctno'] . "' ></td>
<td><input type='text' readonly size=25 name='bname' value='" 
$row['bname'] . "'></td>
<td><input type='text' readonly size=25 name='purpose' value='" 
$row['purpose'] . "'></td>
<td><input type='text' size=7 id='paidamt' name='paidamt' value='" 
$row['paidamt'] ."'
   onblur='calculate_paid(this)'></td>
<td><input type='text' size=7 id='amtdue' name='amtdue' value='" 
$row['amtdue'] . "' ></td>
<td><input type='text' size=10 id='datepaid' name='datepaid' value='" 
$row['datepaid'] . "' ></td>
<td><input type='text' size=7 id='pd' name='pd' value='" 
$row['pd'] . "' ></td>
</tr>"
;
   }
echo 
"</table><p>
<input type='submit' name='update' value='Update Record' />
</form>"
;
   }  
 else{echo 
"invalid entry for acct# $acctno.<br />Select another? <br />";}
   {
if(!empty(
$_POST["update"]))
   {

$sql "UPDATE oocust SET
     
      
 amtdue = '" 
mysql_real_escape_string($_POST['amtdue']) . "',
 paidamt = '" 
mysql_real_escape_string($_POST['paidamt']) . "', 
 datepaid = '" 
mysql_real_escape_string($_POST['datepaid']) . "', 
 pd = '" 
mysql_real_escape_string($_POST['pd']) . "'
WHERE acctno = '
$acctno' ";
$con->query($sql);
 }
}     
    
?>
HTML Code:
<form method="post" action="#">
<br />Click and select<img src="arrow14.gif">[ATTACH=CONFIG]5479[/ATTACH]
<input type="text" name="acctno"/> <p>
Then
<input type="submit" name="submit" value="Submit"/><p>
<center><input type="submit" name=cksubmit value="check#" STYLE="color: #000000; background-color: #ccffff;">
</form></body></html>