Quantcast
Channel: User Ryan - Stack Overflow
Viewing all articles
Browse latest Browse all 16

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

$
0
0

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 all articles
Browse latest Browse all 16

Trending Articles