/
alterarCliente.php
40 lines (36 loc) · 1.47 KB
/
alterarCliente.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
<?php
require_once './header.php';
require_once './Cliente.php';
//Cria uma instancia de clientes
$Cliente = new Cliente();
$NomeCliente = $Cliente->find($_GET['id']);
if (isset($_GET['name'])){
$Cliente->alterar($_GET['id'], $_GET['name']);
header("location:indexCliente.php");
}
?>
<div class="container">
<h1>Alteração de Clintes</h1>
<hr class="divider">
<div class="row">
<h4 class="text-center text-uppercase">Cliente: <?php echo $NomeCliente['name']; ?> </h4>
<form method="get">
<div class="row">
<div class="col-lg-2">
<label class="control-label">id</label>
<input readonly class="form-control" name="id" value="<?php echo $_GET['id']; ?>"/>
</div>
<div class="col-lg-4">
<label class="control-label">Nome</label>
<input class="form-control" name="name" value="<?php echo $NomeCliente['name']; ?>"/>
</div>
</div>
<hr class="divider">
<div class="btn-group">
<button class="btn btn-success " type="submit" name="btnSubmit"><span class="glyphicon glyphicon-check"/> Salvar</button>
<a class="btn btn-primary" href="indexCliente.php"><span class="glyphicon glyphicon-chevron-left"/> Voltar</a>
</div>
</form>
</div>
</div>
<?php require_once './footer.php'; ?>