-
I can't edit but I have a question.
Would I be best to use this if I didn't want html, sql injections, javascript etc? I'll be making BBcode for html, so no redirects etc...
PHP Code:
<?
function clean($str)
{
$cl = strip_tags(addslashes(stripslashes(htmlspecialchars($str))));
return $cl;
?>
-
Don't bother with addslashes, stripslashes will work by itself fine. But apart from that, looks good.
-
-
-
Quote:
Originally Posted by
01101101entor
Aha, thanks for posting that. +rep :D
-
-
I saw this during SOSE in the computer lab. I started laughing, and everyone looked at me weirdly :P