Zkuste...
$stmt = $dbh->prepare("SELECT * FROM registry WHERE firstname = :name OR lastname = :name;");
$stmt->bindParam(':name', $name);
Zkuste...
$stmt = $dbh->prepare("SELECT * FROM registry WHERE firstname = :name OR lastname = :name;");
$stmt->bindParam(':name', $name);