Can someone help me store a string that has an apostrophe within it? I thought that using mysql_real_escape_string was supposed to add a slash when retrieving, but remove the slash before storing. Here is a portion of my code and then also the result of the data after it is stored:
$deceasedname = mysql_real_escape_string($_POST['deceasedname']);
$condolences = mysql_real_escape_string($_POST['condolences']);
$fname = mysql_real_escape_string($_POST['fname']);
$lname = mysql_real_escape_string($_POST['lname']);
echo '<html><head><title>Codolence Request</title></head><body>
<h2>Condolence Submission on:</h2><p> ' . date("h:i, jS F") . '</p>
<p>New Condolence Request</p>
<table>
<tr><td>Name of Contributor:</td><td>' . $fname . $lname.'</td></tr>
<tr><td>Name of Deceased:</td><td>' . $deceasedname . '</td></tr>
<tr><td>Condolence: </td><td>' . $condolences . '</td></tr>
<tr><td>View from:</td><td><a href="http://diehlfuneralhome.com/admin/adminpages/forms/condolenceDisplay.php">Administrative pages</a></td></tr>
</table></body></html>';
After submitting the information with the name Anna O'Connell, here is the result:
Name of Deceased: Anna O\\\'Connell
I would like to display the name as i t