my code works, but i want it to do more. currently it returns all information in one dbase (bills02) based on user input from an html form.
what i want to be able to do is have the user input a number(apn) and have the php search one table(excluded) in the database and if their number is found print a message(your apn is excluded). if their number is not found, then it is goes and searches the other table in the database (bills02) and displays the relevant information (what it basically does not).
i appreciate your thoughts on this.
phpcode\\\\\\\
mysql_connect (localhost, remeed, "i8@home");
mysql_select_db (remediation);
if ($apn == "")
{$apn = '%';}
$result = mysql_query ("SELECT bills02.co, bills02.apn, bills02.ann, bills02.fee, bills02.contam
FROM bills02
WHERE bills02.apn = '$apn%'
");
if ($row = mysql_fetch_array($result)) {
do {
print ("<h5>APN (Parcel Number)</h5>");
print $row["apn"];
print ("<p>Annualized Water Bill</p>");
print $row["ann"];
print ("<h2>Remediation Fee</h2>");
print $row["fee"];
print ("<p>Contaminated?</p>");
print $row["contam"];
print (" ");
} while($row = mysql_fetch_array($result));
} else {print "Sorry, no records were found!";}
?>