I use mdb for development, the odbc_execute failed when the field has a single-quote (').
Can anybody help? Does it happen when using mySQL?
The update program would look like this:
<?php
$host = "localhost";
$connectlogin = "";
$connectpassword = "";
$database = "ncri";
$connectid = odbc_pconnect ( $database, $connectlogin, $connectpassword, SQL_CUR_USE_ODBC );
$tips_string = "Father's Last Name";
$userid = "001";
$sql ="update tips set tips='$tips_string' where userid = '$userid');
$prepresult = odbc_prepare($connectid, $sql);
$rtn = odbc_execute($prepresult);
odbc_close($GLOBALS["odbc_connection"]);
if ($rtn) {
print "<h2> Update successful</h2><BR>\n"; }
else {
print "<h2> Update Failed</h2><BR>\n"; }
?>