Skip to content

Instantly share code, notes, and snippets.

@erick-jeronimo
Created April 17, 2019 23:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erick-jeronimo/839bed7a36db515242cbb80ed75a4903 to your computer and use it in GitHub Desktop.
Save erick-jeronimo/839bed7a36db515242cbb80ed75a4903 to your computer and use it in GitHub Desktop.
<?php
include '../../utils/bd.php';
$stmt = $conn->prepare("UPDATE cliente SET nome = :nome, email = :email, cnpj = :cnpj
WHERE idcliente = :id");
$stmt->bindParam(':id', $_POST['id']);
$stmt->bindParam(':nome', $_POST['nome']);
$stmt->bindParam(':email', $_POST['email']);
$stmt->bindParam(':cnpj', $_POST['cnpj']);
try
{
$stmt->execute();
header("Location: ../../pages/cliente/listar.php");
}
catch(PDOException $e)
{
echo "Erro: " . $e->getMessage();
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment