4 ms·
I'm not a fan of PHP, but I remember it having some lightweight, built in API to secure SQL queries. On the other hand, using a good ORM with a mature web frame
by mkl95 5y ago
I'm not a fan of PHP, but I remember it having some lightweight, built in API to secure SQL queries. On the other hand, using a good ORM with a mature web framework removes most common vulnerabilities, and you don't have to worry as much about your junior peers creating security holes.
- hannob 5y agoPDO is pretty straightforward: $s = $dbc->prepare("SELECT * FROM table WHERE field = :foo"); $s->bindValue(':foo', $_GET['foo']); $r = $s->execute(); But all of that of course doesn't help if people don't use it.