Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End protect comment Re: protect comment

#103985

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 ?