Answer the question
In order to leave comments, you need to log in
Is it correct to clear variables in PHP this way?
Good day. Is it correct to clear variables in this way? If not, then why and how, please explain to a novice php developer.
$ora = "(au.payment LIKE '%" . $system->cleanvars($_SESSION['advs']['payment'][0]) . "%') AND ";
Answer the question
In order to leave comments, you need to log in
No, not right.
Variables do not need to be cleared. AT ALL . You just need to work correctly with the library for the DBMS.
To work with the request as with a string is also not correct.
Learn: www.php.net/manual/en/pdostatement.bindvalue.php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question