Updating to mysqli
Hello Ray,
I am trying to update a .php page to mysqli but am receiving a syntax error on line 93
I am attaching the page and wonder if you can see where I am going wrong?
Many thanks
John
Hello Ray,
I am trying to update a .php page to mysqli but am receiving a syntax error on line 93
I am attaching the page and wonder if you can see where I am going wrong?
Many thanks
John
It doesn't look like the code has been updated to mySQLi. It looks like just the connection was updated.... If you open the server behavior and re-apply it then the code should be updated to MySQLi. The entire chunk of code should be updated. This is MySQL standard code that just has the connection updated to MySQLi, so that is why it has an error.
Thanks Ray
When you say "open the server behavior and re-apply it" I do not understand.
I have opened and closed the Recordsets and the MySqli Dynamic lists/Menu items but this seems to make no difference.
The issue is with the Insert Record server behavior. If you don't see it in the Server Behaviors panel, it might be because of hand edits preventing Dreamweaver from recognizing it. It looks like you may have removed a few line breaks... try updating lines 102-116 to:
GetSQLValueString($_POST['Description1'], "text"),
GetSQLValueString($_POST['ForSale'], "text"),
GetSQLValueString(isset($_POST['ContactPermission'])?"1":"0", "int"));
mysql_select_db($database_conn1_i, $conn1_i);
$Result1 = mysql_query($insertSQL, $conn1_i) or die(mysql_error());
$insertGoTo = "boat_insert_images.php";
if (isset($_SERVER['QUERY_STRING'])) {
$insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
$insertGoTo .= $_SERVER['QUERY_STRING'];
}
header(sprintf("Location: %s", $insertGoTo));
}
?>
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.