Hey, I'm designing a Flash website with a form for visitors to leave comments, which feeds them to a MS Access document. When the form is submitted, I get this error message:
// ODBC Error: PHP Warning: odbc_exec() []: SQL error: [Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query., SQL state S1000 in SQLExecDirect in C:\All_web\stnl\comments.php on line 12
The thing is, the database is being written to properly, I open it up and all the web-entered text is in there, so what is my problem? My short PHP script follows:
<?php
$name = $POST['name'];
$email = $POST['email'];
$comments = $_POST['comments'];
// Open a connection to the database:
$conn=odbc_connect("stnlcomments", "", "");
if (!$conn) {
exit("Connection Failed: " . $conn);
}
$sql="INSERT INTO comments (name, email, comments) VALUES ('$name', '$email', '$comments')";
$rs=odbc_exec($conn,$sql);
if (!$rs){
exit('ODBC Error: ' . $rs);
}
// Clean up
odbc_close($conn);
?>
Answers to this would be much appreciated.