Question: You want to use wildcard characters when searching for records in a MySQL/MariaDB database using a PDO prepared statement. Which code should you use?

  1. `$statement->bindValue(':name', '%' . $_GET['name'] . '%');`
  2. `$statement->bindValue('%' . $_GET['name'] . '%', ':name');`
  3. `$statement->bindParam(':name', '%' . $_GET['name'] . '%');`
  4. `$statement->bindParam('%' . $_GET['name'] . '%', ':name');`

Answer: The correct answer of the above question is Option A:`$statement->bindValue(':name', '%' . $_GET['name'] . '%');`