My update
in the bank does not work, it follows codes:
aluno.php
<form method="post" action="?acao=save&id_aluno=<?php echo $id; ?>">
<?php echo $pegaid; ?>
<input type="text" name="ID" class="txt-medium bradius" value="<?php echo $id; ?>"/>
<input type="text" name="Nome_completo" class="txt-medium bradius" value="<?php echo $full_name; ?>"/>
<input type="submit" value=" Salvar " class="btn-save-medium" />
</form>
header.php
if($_GET["acao"] == ("save")) {
$startaction = 6;
}
inserts.php
include 'header.php';
if($startaction == 6){
if($acao == "save") {
$pegaid = $_GET['id_aluno'];
$pegaidpost = $_POST['ID'];
$update_full_name = $_POST['Nome_completo'];
$update_data = "UPDATE alunos SET Nome_completo = '$update_full_name' WHERE ID = '$pegaid'";
if($update_data) {
echo"<script> alert('Dados atualizados com sucesso'); </script>";
} else {
echo"<script> alert('Dados NÃO atualizados'); </script>";
}
}
}
I looked at the field name in my database, it is Nome_completo
normal, just as it is in the name="Nome_completo"
parameter;