Would you please recommend how I could improve this code? My PHP editor only gave a warning about the variable $id.require_once 'includes/config.php';$id = (isset($_GET['id']) || trim($_GET['id'])) ? intval($_GET['id']) : 0;if (!empty($id) && filter_var($id, FILTER_VALIDATE_INT)) {    $sql = $pdo->prepare(SELECT * FROM users WHERE id = :id);    $sql->bindValue(':id', $id);    $sql->execute();    $row = $sql->fetch(PDO::FETCH_ASSOC);  } else {      $user->redirectTo('index');  }  if ($row === false){      $error[] = No user found, sorry!;  }  if (isset($error)){      foreach($error as $error){          echo '<div class=alert alert-danger role=alert>'.$error.'</div>';          $user->redirectTo('index');      }  }
Details of a user
php;pdo