Answer the question
In order to leave comments, you need to log in
Can such a record protect against sql injections and other PDO evil spirits?
Hello.
Recently I started to study PDO and found such information that in such a record it is unnecessary to shield the POST request from all evil spirits and injections. Is this true?
$sth=$this->db->prepare("SELECT id FROM users WHERE login=:login AND password=MD5(:password)");
$sth->execute(array(
':login'=>$_POST['login'],
':password'=>$_POST['password']
));
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question