I'm pretty new with PDO. I'm wondering is this now safe from SQL injections?
$name = isset($_GET['name']) ? $_GET['name'] : null;
// Fetch some info
$stmt = $db->prepare("SELECT * FROM players WHERE name = ? AND account_id = ?");
$stmt->execute(array($name, $aid));
$row = $stmt->fetch();
if ($row) {
$stmt = $db->prepare("DELETE FROM players WHERE id = ?");
$stmt->execute(array($row['id']));
header("Location: /account");
exit();
} else {
header("Location: /account");
exit();
}