/** * Adiciona uma cadeira a um aluno * @param string $aluno * @param string $cadeira */ function addCadeira($aluno, $cadeira) { $idAluno = getAluno($aluno); $idCadeira = getCadeira($cadeira); $queryAdd = "insert into aluno_has_cadeira(cadeira_id, aluno_id) values(?,?)"; $paramsAdd = array(intval($idCadeira), intval($idAluno)); queryMysqli($queryAdd, $paramsAdd); }
<?php include 'crud/aluno.php'; $aluno = getAluno($_GET['id']); ?> <div class="col-md-10 main"> <form action="crud/aluno.php" method="post" class="form-horizontal"> <fieldset> <legend>Editar Aluno</legend> <div class="form-group"> <label class="col-md-2 control-label" for="nome">nome</label> <div class="col-md-10"> <input required class="form-control" id="nome" name="nome" type="text" placeholder="nome" value="<?php echo $aluno['nome']; ?> " /> </div> </div> <div class="form-group"> <label class="col-md-2 control-label" for="matricula">matricula</label> <div class="col-md-10"> <input required class="form-control" id="matricula" name="matricula" type="text" placeholder="matricula" value="<?php echo $aluno['matricula']; ?> "/> </div> </div> <div class="form-group"> <label class="col-md-2 control-label" for="usuario">usuario</label> <div class="col-md-10">