We have this form on our Intranet that we use to update our rate sheets. We go into an admin site to change the rates then click on the submit button and the form is supposed to email the defined users with the new rate sheet. When I click on the submit button it gives me this message:
Notice: Undefined variable: result in C:\webs\SEWS\admin\rates\changerates.php on line 63
So when I go to the code and view this line number all I see is this:
if($result) {
All the code above this line is:
<?
if($name == "rate" && $pword == "changes") {
if(!isset($submit)) {
include 'connect.php';
$table="mortgage_rates";
$query = "select * from $table";
$queryresult = mssql_query($query);
while($row=mssql_fetch_array($queryresult)) {
$he80 = "$row[he80]";
$he90 = "$row[he90]";
$he100 = "$row[he100]";
$heloc80 = "$row[heloc80]";
$heloc90 = "$row[heloc90]";
$heloc100 = "$row[heloc100]";
$reslot = "$row[reslot]";
}
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> SCU Intranet </TITLE>
<LINK REL=stylesheet HREF="/include/style.css" TYPE="text/css">
</HEAD>
<BODY>
<center>
Mortgage Loan Rates<br>
<? echo "<b>".date("F d,Y")."</b>"; ?><br><br>
<center>
<?
if(isset($submit)) {
$array = array('H/E 80%' => 'he80',
'H/E 90%' => 'he90',
'H/E 100%' => 'he100',
'HELOC 80' => 'heloc80',
'HELOC 90' => 'heloc90',
'HELOC 100' => 'heloc100',
'5 Year Residential Lot' => 'reslot');
while(list($k, $v) = each($array)) {
$i = 0;
if(empty($$v)) {
echo "<b>$k</b> is a required field.<br>";
$i++;
}
}
if($i != 0) {
echo "<b>Errors on the form prevent it from being submitted.</b>";
} else {
include 'connect.php';
$table="mortgage_rates";
I am so confused

as to what all this means and how I need to fix this problem. We had someone that worked on our Intranet, but he is no longer with us. Any help you can provide would be greatly appreciated.