0

I have a simple question:

Which version is the correct one for preventing SQLi ?

$db_request = $db->prepare( "UPDATE users SET active = 0 WHERE id = ? AND active = ?" );

$db_request->execute( array( $uid, $hash ) );

or

using bindParam ?

Thanks for your time!

LE: ? = input from user

adi pslr
  • 55
  • 6

0 Answers0