function escapeSingleQuotes($string){
//escapse single quotes
$singQuotePattern = "'";
$singQuoteReplace = "''";
return(stripslashes(eregi_replace($singQuotePattern, $singQuoteReplace, $string)));
}
$type = escapeSingleQuotes($_POST['type']);
$description = escapeSingleQuotes($_POST['description']);
No comments:
Post a Comment