I have text areas that i'm trying to convert any single quote into the html code '
Here's what I have dealing with that variable.
if (isset($_POST['stat']))
{$stat = $_POST['stat'];
$stat = str_replace("\'", "'", $stat);
$stat = str_replace("\n", "</li><li>", $stat);
$stat = "<ul><li>" . $stat . "</li></ul>";
}else {$stat="";}
Ive tried
$stat = str_replace("\'", "'", $stat);
and
$stat = str_replace("'", "'", $stat);
But I still get a mysql error showing that the single quote was not changed.
Thank you for any help you can give me.