Will it be better if i add to mysql_real_escape_string also addslashes like that:
$username = mysql_real_escape_string(trim(addslashes($_POST['username'])));
And is there any need in this in password var:
$password = md5(mysql_real_escape_string(trim($_POST['password'])));
Also i read some topics about safe retrieving data from db…
it says that it would be better to retrieve data like that:
htmlentities(stripslashes($v))
Is it really necessary for safety?
1 Answer