What is the best practice for running MySQL queries in PHP? Consider the risk of SQL injection.
Answer
Correct Answer: Use PDO prepared statements and parameterized queries: for example: $input=
$_POST[“user-input”] $stmt = $pdo->prepare(„INSERT INTO table (column)
VALUES (“:input”); $stmt->execute(array(„:input‟ => $input));
Explanation:
Note: This Question is unanswered, help us to find answer for this one