Monday, January 18, 2010
A way to prevent SQL injection in PHP
Add this function into yr code.
function
cleanInputData
(
$data
)
{
$cleaned
=
trim
(
$data
);
$cleaned
=
mysql_real_escape_string
(
$cleaned
);
return
$cleaned
;
}
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment