What is the potential issue with using mysql_query() to execute multiple SQL statements from a file in PHP?

Using mysql_query() to execute multiple SQL statements from a file in PHP can potentially lead to SQL injection attacks if the input is not properly sanitized. To solve this issue, you should use parameterized queries or prepared statements to prevent SQL injection vulnerabilities.

// Open the SQL file and read its contents
$sqlFile = 'path/to/your/sql/file.sql';
$sql = file_get_contents($sqlFile);

// Use prepared statements to execute the SQL queries
$stmt = $pdo->prepare($sql);
$stmt->execute();