Is it recommended to use Multi-Queries in PHP without proper handling, and what are the potential pitfalls?

It is not recommended to use Multi-Queries in PHP without proper handling as it can lead to SQL injection vulnerabilities. To mitigate this risk, it is crucial to use prepared statements or parameterized queries to sanitize user input and prevent malicious SQL injection attacks.

// Example of using prepared statements to prevent SQL injection
$stmt = $pdo->prepare("SELECT * FROM users WHERE username = :username");
$stmt->bindParam(':username', $username);
$stmt->execute();