-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditar.php
60 lines (49 loc) · 1.82 KB
/
editar.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
48
49
50
51
52
53
54
55
56
57
58
59
<?php
//conexao
include_once 'php_action/db_connect.php';
include_once 'includes/header.php';
//select
if(isset($_GET['id'])):
$id = mysqli_escape_string($connect, $_GET['id']);
$sql = "SELECT * FROM clientes where id = '$id'";
$resultado = mysqli_query($connect,$sql);
$dados = mysqli_fetch_array($resultado);
endif;
?>
<div class="row">
<div class=" col s12 m6 push-m3 ">
<h3 class="light">Editar Cliente</h3>
<form action="php_action/update.php" method="POST">
<input type="hidden" name="id" value="<?php echo $dados['id'];?>">
<div class="input-field col s12">
<input type="text" name="nome" id="nome" value="<?php echo $dados['nome'];?>">
<label for="nome">Nome</label>
</div>
<div class="input-field col s12">
<input type="text" name="endereco" id="endereco" value="<?php echo $dados['endereco'];?>">
<label for="endereco">Endereço</label>
</div>
<div class="input-field col s12">
<input type="text" name="numero" id="numero" value="<?php echo $dados['numero'];?>">
<label for="numero">Numero</label>
</div>
<div class="input-field col s12">
<input type="text" name="bairro" id="bairro" value="<?php echo $dados['bairro'];?>">
<label for="bairro">Bairro</label>
</div>
<div class="input-field col s12">
<input type="text" name="telefone" id="telefone" value="<?php echo $dados['telefone'];?>">
<label for="telefone">Telefone</label>
</div>
<div class="input-field col s12">
<input type="text" name="data" id="data" value="<?php echo $dados['data'];?>">
<label for="data">Data</label>
</div>
<button type="submit" name="btn-editar" class="btn"> ATUALIZAR </button>
<a href="lista.php" class="btn green">LISTA DE CLIENTE</a>
</form>
</div>
</div>
<?php
include_once 'includes/footer.php';
?>