$alunos = new Alunos($conexao); if (isset($_GET['id'])) { $id = $_GET['id']; $result = $alunos->find($id); $nome = $result['nome']; $nota = $result['nota']; } if (isset($_POST['enviar'])) { $id = $_POST['id']; $nome = $_POST['nome']; $nota = $_POST['nota']; echo $id; echo $nome; echo $nota; $alunos->setId($id)->setNome($nome)->setNota($nota); if ($alunos->alterar()) { header("location:/"); } else { echo "Falha na alteração do Registro"; } } ?> <html> <head> <title>Alunos</title> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="bootstrap.min.css"> </head>