-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction-editar-representante.php
47 lines (38 loc) · 1.38 KB
/
action-editar-representante.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<?php
require("conexao.php");
$id = $_POST["id"];
$nome = $_POST["nome"];
$email = $_POST["email"];
$telefone = $_POST["telefone"];
$cpf = $_POST["cpf"];
$endereco = $_POST["endereco"];
$cidade = $_POST["cidade"];
$estado = $_POST["estado"];
$pais = $_POST["pais"];
$username = $_POST["username"];
$password = $_POST["password"];
$sql = "UPDATE representantes set nome = :nome,
email = :email,
telefone = :telefone,
cpf = :cpf,
endereco = :endereco,
cidade = :cidade,
estado = :estado,
pais = :pais,
login = :login,
senha = :senha
WHERE id = :id";
$stmt = $PDO->prepare( $sql );
$stmt->bindParam( ':nome', $nome );
$stmt->bindParam( ':email', $email );
$stmt->bindParam( ':telefone', $telefone );
$stmt->bindParam( ':cpf', $cpf );
$stmt->bindParam( ':endereco', $endereco );
$stmt->bindParam( ':cidade', $cidade );
$stmt->bindParam( ':estado', $estado );
$stmt->bindParam( ':pais', $pais );
$stmt->bindParam( ':login', $username );
$stmt->bindParam( ':senha', $password );
$stmt->bindParam( ':id', $id );
$result = $stmt->execute();
?>