Code: Select all
$field1 = mysqli_real_escape_string($cxnA, $field1)When I select on the field
Code: Select all
select * from table1 where field1='Bill\'s car'I have to use
Code: Select all
select * from table1 where field1='Bill's car'If I display this field in a browser using
Code: Select all
<input type='text' name=field1 value='".htmlentities($field1Value, ENT_QUOTES, 'UTF-8')."' maxlength='50'>I have to use
Code: Select all
<input type='text' name=field1 value='".htmlspecialchars_decode(htmlentities($field1Value, ENT_QUOTES, 'UTF-8'), ENT_QUOTES)."' maxlength='50'>I have even tried the following to get it to insert the proper value:
Code: Select all
$field1 = html_entity_decode(mysqli_real_escape_string($cxnA, $field1), ENT_QUOTES);Any help would be appreciated.