PHP KNOWLEDGE SHARE
A blog for PHP Knowlegde Sharing.
Tuesday, 15 October 2013
Function to avoid XSS (Cross Site Scripting)
function test_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment