try adding the following code at line 1 of your page, this will convert the posted information to html entities. the single quote will become '& #039;'
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
$_POST[$key] = htmlspecialchars($val, ENT_QUOTES);
}
}
?>