Edit php client

Asked

Viewed 32 times

0

Good afternoon I am not managing to edit the client is not giving nor an error only does not edit

session_start();
include_once("conexao.php");

$id = filter_input(INPUT_POST, 'id', FILTER_SANITIZE_NUMBER_INT);
$nome = filter_input(INPUT_POST, 'nome', FILTER_SANITIZE_STRING);
$email = filter_input(INPUT_POST, 'email', FILTER_SANITIZE_STRING);
$telefone = filter_input(INPUT_POST, 'telefone', FILTER_SANITIZE_STRING);
$numeros_convidados = filter_input(INPUT_POST, 'numeros_convidados', FILTER_SANITIZE_STRING);
$diamesano = filter_input(INPUT_POST, 'diamesano', FILTER_SANITIZE_STRING);
$tipo = filter_input(INPUT_POST, 'tipo', FILTER_SANITIZE_STRING);
$mensagem = filter_input(INPUT_POST, 'mensagem', FILTER_SANITIZE_STRING);


//echo "Nome: $nome <br>";
//echo "E-mail: $email <br>";

$result_usuario = "UPDATE mensagens_contatos SET nome='$nome', email='$email', telefone='$telefone', numero_convidados='$numeros_convidados',diamesano='$diamesano',tipo='$tipo',modified=NOW() WHERE id='$id'";
$resultado_usuario = mysqli_query($conn, $result_usuario);

if(mysqli_affected_rows($conn)){
    $_SESSION['msg'] = "<p style='color:green;'>Usuário editado com sucesso</p>";
    header("Location: edit.php");
}else{
    $_SESSION['msg'] = "<p style='color:red;'>Usuário não foi editado com sucesso</p>";
    header("Location: editar.php?id=$id");
}
  • No he’s not giving the result of Isis

  • could put your code of the file connected.php, to insert it works?

  • Did you check if it is changing in the bank or if it is really giving error?

  • I did check this

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.