Home › Forums › Back End › protect comment › Re: protect comment
June 6, 2012 at 6:11 pm
#103985
Participant
I understand you … I use the bbcode and this is my security function
public function post($post,$type=false) {
if(get_magic_quotes_gpc()){
$post = stripslashes($post);
}
$post = mysql_real_escape_string($post);
$post = trim($post);
$post = ($type==false?strip_tags($post):htmlspecialchars($post));
return $post;
}
in comment box i’m doing
post($_POST,true);
and on each other i’m doing
post($_POST);
this is true ?