Skip to content

Commit

Permalink
Corrigindo issue [#269]
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolly015 committed Sep 4, 2024
1 parent ab8b577 commit 1c56ca3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions html/pessoa/editar_documentacao.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,17 @@
$data_expedicao = ($data_expedicao ? "'$data_expedicao'" : "NULL");
$cpf = ($cpf ? "'$cpf'" : "NULL");

$sql = "UPDATE pessoa SET registro_geral=$rg, orgao_emissor=$orgao_emissor, data_expedicao=$data_expedicao, cpf=$cpf WHERE id_pessoa=$id_pessoa;";
$sql = "UPDATE pessoa SET registro_geral = :rg, orgao_emissor = :orgao_emissor, data_expedicao = :data_expedicao, cpf = :cpf WHERE id_pessoa = :id_pessoa";

$pdo->query($sql);
$stmt = $pdo->prepare($sql);

$stmt->bindParam(':rg', $rg);
$stmt->bindParam(':orgao_emissor', $orgao_emissor);
$stmt->bindParam(':data_expedicao', $data_expedicao);
$stmt->bindParam(':cpf', $cpf);
$stmt->bindParam(':id_pessoa', $id_pessoa);

$stmt->execute();

$_GET['sql'] = $sql;
echo(json_encode($_GET));

0 comments on commit 1c56ca3

Please sign in to comment.