Im new to databases, and Im not sure what the problem is, so I'll just post what I know.
heres the code, from line 91 - 111, with the error lines in bold (94 and 110)
Code:
$SQL_Exec_String = "Insert Into customers (FirstName, LastName, Address1, Address2, City, State, Zip, Email, LubricantChoice)
Values ('$FirstName', '$LastName', '$Address1', '$Address2', '$City', '$State', '$Zip', '$Email', '$LubricantChoice')";
$cur= odbc_exec( $cnx, $SQL_Exec_String );
if (!$cur) {
Error_handler( "Error in odbc_exec( no cursor returned ) " , $cnx );
}
odbc_close( $cnx);
}
$strOldEntries = "Previous Entries in database";
$strNewEntries = "Updated version of databse (after entries)";
HTML_Head();
Database_Entries($strOldEntries);
Output_Entries();
Enter_New_Entry($FirstName,$LastName,$Address1,$Address2,$City,$State,$Zip,$Email,$LubricantChoice);
Database_Entries($strNewEntries);
when i hit submit on the entry page, it displays the old records in my table, and below it, it shows this:
Notice: Undefined variable: FirstName in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: LastName in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: Address1 in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: Address2 in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: City in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: State in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: Zip in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: Email in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Notice: Undefined variable: LubricantChoice in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 110
Warning: odbc_exec(): SQL error: [Microsoft][ODBC Microsoft Access Driver] Field 'customers.FirstName' cannot be a zero-length string., SQL state S1000 in SQLExecDirect in D:\websites\Sliquid\wwwRoot_Sliquid\html\db\dataac cess.php on line 94
Error in odbc_exec( no cursor returned )
also, it does not add the new record to the database.