travisbrown
Technical User
- Dec 31, 2001
- 1,016
does anything look wrong with this?
If I comment out these lines:
//$conn->Execute( $sSQL ); //Execute SQL query
//$conn->Close(); //Close database connection
//$conn->Release(); //Release resources for this
sSQL echoes out. If I uncomment them, nothing happens: no error, no insert...
Sorry for the rudimentary post. I'm mostly unfamiliar with PHP.
Code:
$mail_name = $_POST["name"];
$mail_email = $_POST["email"];
$mail_birthday = $_POST["birthday"];
//echo $_ENV["SCRIPT_FILENAME"];
$dbLocation = "d:\websites\mysite\admin\data.mdb;";
$conn = new COM ("ADODB.Connection") or die( "Cannot start ADO" );
$conn->Open( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=".$dbLocation );
$sSQL = "insert into tbl_mailing_list (email_birthday,email_address,email_name) values ('$mail_birthday','$mail_email','$mail_name')";
echo $sSQL
$conn->Execute( $sSQL );
$conn->Close();
$conn->Release();
If I comment out these lines:
//$conn->Execute( $sSQL ); //Execute SQL query
//$conn->Close(); //Close database connection
//$conn->Release(); //Release resources for this
sSQL echoes out. If I uncomment them, nothing happens: no error, no insert...
Sorry for the rudimentary post. I'm mostly unfamiliar with PHP.