<html>
<head>
<title>ThaiCreate.Com PHP & Access Tutorial</title>
</head>
<body>
<?php
$objConnect = odbc_connect("mydatabase","","") or die("Error Connect to Database");
$strSQL = "INSERT INTO customer ";
$strSQL .="(CustomerID,Name,Email,CountryCode,Budget,Used) ";
$strSQL .="VALUES ";
$strSQL .="('".$_POST["txtCustomerID"]."','".$_POST["txtName"]."','".$_POST["txtEmail"]."' ";
$strSQL .=",'".$_POST["txtCountryCode"]."','".$_POST["txtBudget"]."','".$_POST["txtUsed"]."') ";
$objExec = odbc_exec($objConnect, $strSQL);
if($objExec)
{
echo "Save Done.";
}
else
{
echo "Error Save [".$strSQL."]";
}
odbc_close($objConnect);
?>
</body>
</html>