-2
Man update
in the bank does not work, follows codes:
php student.
<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;
}
php Inserts.
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 up the name of the field in my database, it’s Nome_completo
normal, just like this in the parameter name="Nome_completo"
;
You are missing all connection scripts with the Bank, which might just be causing your problem.
– Thiago Santos