-
Notifications
You must be signed in to change notification settings - Fork 71
/
read.php
102 lines (93 loc) · 3.74 KB
/
read.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
<?php
require 'banco.php';
$id = null;
if (!empty($_GET['id'])) {
$id = $_REQUEST['id'];
}
if (null == $id) {
header("Location: index.php");
} else {
$pdo = Banco::conectar();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT * FROM pessoa where id = ?";
$q = $pdo->prepare($sql);
$q->execute(array($id));
$data = $q->fetch(PDO::FETCH_ASSOC);
Banco::desconectar();
}
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="assets/css/bootstrap.min.css">
<title>Informações do Contato</title>
</head>
<body>
<div class="container">
<div class="span10 offset1">
<div class="card">
<div class="card-header">
<h3 class="well">Informações do Contato</h3>
</div>
<div class="container">
<div class="form-horizontal">
<div class="control-group">
<label class="control-label">Nome</label>
<div class="controls form-control">
<label class="carousel-inner">
<?php echo $data['nome']; ?>
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Endereço</label>
<div class="controls form-control disabled">
<label class="carousel-inner">
<?php echo $data['endereco']; ?>
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Telefone</label>
<div class="controls form-control disabled">
<label class="carousel-inner">
<?php echo $data['telefone']; ?>
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Email</label>
<div class="controls form-control disabled">
<label class="carousel-inner">
<?php echo $data['email']; ?>
</label>
</div>
</div>
<div class="control-group">
<label class="control-label">Sexo</label>
<div class="controls form-check disabled">
<label class="carousel-inner">
<?php echo $data['sexo']; ?>
</label>
</div>
</div>
<br/>
<div class="form-actions">
<a href="index.php" type="btn" class="btn btn-default">Voltar</a>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.js" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js"
integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49"
crossorigin="anonymous"></script>
<!-- Latest compiled and minified JavaScript -->
<script src="assets/js/bootstrap.min.js"></script>
</body>
</html>