Yes, I think you're exactly right with that assessment. The problem has to do with the connection, not the variables. I have verified that there is a connection, because I have another php file that selects all the data and echos it, and it works fine. I don't understand why the connection is lost whenever I try to insert.
I got rid of the variables and put the connection script in the file rather than use an include. So here's what I've got at this point ...and it still gives me a closed connection error.
<html>
<head>
<title>insert</title>
</head>
<body>
<?php
//Specify the path to the database
//Note: this is an absolute path
$databaseLocation = "c:\\wamp\\www\\Jim_Langeveld\\Maintenance1.mdb";
//Dreate an instance of the ADO connection object
$conn = new COM ("ADODB.Connection") or die("Cannot start ADO");
//Define connection string, specify database driver
$connStr = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source=$databaseLocation;";
//get the main menu and display it at the top of the page
include('menu.html');
//insert the data
$insert = "INSERT INTO tblPurchasesHeader (Vendor, InvoiceDate,Invoice,TotalAmount,TaxAmount) VALUES (".$_POST['vendor']."','".$_POST['date']."','".$_POST['invoice']."','".$_POST['total']."','".$_POST['total']."')";
//Insert the new data into the database
$conn->Execute($insert);
echo "The information has been submitted.";
?>
</body>
</html>