Quantcast
Viewing latest article 9
Browse Latest Browse All 16

Answer by Ryan for What should I be aware of to make my web application secure?

my functions of choice for cleaning up user input are

$input = mysql_real_escape_string($input);<br>$input = trim($input);<br>$input = strip_tags($input);<br>$input = htmlspecialchars($input);

and then if I want to disallow certain characters then I just do the following.

$nono = array("=", "{", "}", ";", "[", "]","$","&");<br>$input = str_replace($nono, "", $input);

Viewing latest article 9
Browse Latest Browse All 16

Trending Articles