As zasiditsya from sql injection without OOP in php?

0 like 0 dislike
63 views
Hello, I need to learn how to protect yourself from sql injection without the PLO. I don't know OOP. I read the forums and ranze statii - all write different things, one only of the PLO safely, one mysqli_real_escape_string. Don't know who is true who is not. Write me please how can zasiditsya from the PLO without any freamwork in php.
by | 63 views

4 Answers

0 like 0 dislike
PDO and prepared statements, read more https://habr.com/post/148701/
by
0 like 0 dislike
And where does the fear of the PLO?
In documentation is described how to attach the parameters to the query as in object-oriented style and procedural. To implement the communication with a DBMS can be in fact, and in another style, if we are talking about MySQl.
\rphp.net/manual/ru/mysqli-stmt.bind-param.php

PS: You're just afraid to learn the documentation trying out various examples of implementation. That's all.
by
0 like 0 dislike
Read carefully and understand how to operate the PDO and Google about prepared queries.
by
0 like 0 dislike
I hasten to please. Knowledge of OOP is not required for this. You can just do as many examples to work with PDO as an instrument, without going into details.

But better still take the time to learn at least the OOP syntax in PHP. It's nothing challenging, but great to make life easier.
by

Related questions

0 like 0 dislike
6 answers
asked Mar 22, 2019 by Artqookie
0 like 0 dislike
2 answers
0 like 0 dislike
3 answers
0 like 0 dislike
1 answer
asked Apr 15, 2020 by JoshMart (1.2k points)
0 like 0 dislike
1 answer
110,608 questions
257,186 answers
0 comments
33,726 users