Created
April 17, 2019 23:32
-
-
Save erick-jeronimo/839bed7a36db515242cbb80ed75a4903 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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