I am trying to pull data from MySQL record that has an apostrophy. It comes back with a backslash and rest of string missing. Trust me, I have scoured the internet and nothing so far is working. I must be too tired out on it and it is right in front of me. See code below ...
$sql = "SELECT * FROM ".$tbl." WHERE FIELD_NO = ".$order_no." ORDER BY LINE_NO ASC";
$rs_result = $conn->query($sql);
while($row = $rs_result->fetch_assoc()) {
$addl_info = mysqli_real_escape_string($conn, $row['ADDL_INFO']); //tried this
echo "<td class='col32'><input name='addl_info[]' class='addl_info' type='text' value='".$addl_info."'></td>";
The mysql stored data is "Band of 20's" and it outputs as "Band of 20\" with the 's' missing. I tried everything I can imagine and still I cannot get my full data string returned using PHP. I used mysqli_real_escape_string() to get the data in with the apostrophe but now I cannot get the data back out with the apostrophe and the text that follows it.
I plan to use this particular project to move over to PDO, but I need a fix for now until I can do that. It will take me some time to learn and accomplish PDO.