PhP: oop in combination with procedural programming, possible?

Jangga

Junior Member
Joined
Aug 8, 2016
Messages
196
Reaction score
11
Please guys.... I have a script written in normal procedural way of writing code but, now I want to secure the script from SQL injection but everyone keep saying I should use prepared statement (which requires oop) to secure my queries. My question is this: is it possible to use oop on a script written with non oop codes? Pls, I need useful answers.....thanks all
 
Hello, yes it is possible just import the code which is written in OOP from a different file
 
Prepared statements aren't anything special. You can just jam them in anywhere. Just shove it in there and let the php handle the rest.
 
I feel very stupid for not seeing why OP compares programming paradigms with security. I guess that coders today are not what they used to be, properly schooled and informed.
 
Thanks @all for your input.... I appreciate
 
Back
Top