hello, i have a form field in which i would like to allow apostrophes. ie. blar's. I scrub all my form fields through the following function before displaying them and entering them in a mysql db. However i am getting confused with all the stripslashes() and mysql_real_escape_string() and etc. What functions should i use and how should i modify my regular expression to allow apostrophies?
<?php
if(preg_match('/[^0-9 . \/ ( ) - - A-Z a-z]+/',$string)) // checks for anything other than alphanumeric and () . - // for phone numbers and names
{
return false;
}
?>
Thanks for any and all help.
-emrys