MySQLi generates faulty code
I've been finding that MySQLi generates errors and I'm having to go in and edit the generated code. Sometimes there is a duplication of part of the code giving the value from validated fields and sometimes the " character is randomly escaped as below.
$UpdateQuery->bindColumn("UserAddress1", "s", "".((isset($_POST["address1"]))?$_POST["address1"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("UserAddress2", "s", "".((isset($_POST["address2"]))?$_POST["address2"]:"") ."", "WA_DEFAULT");
$UpdateQuery->bindColumn("UserCity", "s", "".((isset($_POST[\"city\"]))?$_POST[\"city\"]:\"\") .\"", "WA_DEFAULT");
$UpdateQuery->bindColumn("UserState", "s", "".((isset($_POST[\"state\"]))?$_POST[\"state\"]:\"\") .\"", "WA_DEFAULT");
Have you any ideas regarding the source of this problem?
Malcolm