A
A
alexzpua2014-04-20 18:11:12
PHP
alexzpua, 2014-04-20 18:11:12

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

1 answer(s)
O
OnYourLips, 2014-04-20
@alexzpua

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 question

Ask a Question

731 491 924 answers to any question