-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathview.php
More file actions
123 lines (88 loc) · 3.19 KB
/
view.php
File metadata and controls
123 lines (88 loc) · 3.19 KB
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
require_once("config/db.php");
$id = null;
if(!empty($_GET['id'])) {
$id = $_REQUEST['id'];
}
if(null==$id) {
header("Location: index.php");
}
else {
$pdo = connect();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT * FROM contatos where id = ?";
$q = $pdo->prepare($sql);
$q->execute(array($id));
$data = $q->fetch(PDO::FETCH_ASSOC);
disconnect();
}
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="style/css/bootstrap.min.css">
<title>CRUD | PHP</title>
<link rel="shortcut icon" href="favicon.ico">
</head>
<body>
<div class="container">
<div class="row justify-content-center my-5">
<h3>Detalhes do Contato</h3>
</div>
<table class="table table-striped table-bordered">
<tr>
<td>Empresa</td>
<td><?php echo $data['empresa'];?></td>
</tr>
<tr>
<td>Contato</td>
<td><?php echo $data['contato'];?></td>
</tr>
<tr>
<td>Cargo</td>
<td><?php echo $data['cargo'];?></td>
</tr>
<tr>
<td>Telefone</td>
<td><?php echo $data['telefone'];?></td>
</tr>
<tr>
<td>Celular</td>
<td><?php echo $data['celular'];?></td>
</tr>
<tr>
<td>Site</td>
<td><?php echo $data['site'];?></td>
</tr>
<tr>
<td>E-mail</td>
<td><?php echo $data['email'];?></td>
</tr>
<tr>
<td>Endereço</td>
<td><?php echo $data['endereco'];?></td>
</tr>
<tr>
<td>Bairro</td>
<td><?php echo $data['bairro'];?></td>
</tr>
<tr>
<td>Cidade</td>
<td><?php echo $data['cidade'];?></td>
</tr>
<tr>
<td>UF</td>
<td><?php echo $data['uf'];?></td>
</tr>
<tr>
<td>CEP</td>
<td><?php echo $data['cep'];?></td>
</tr>
</table>
<div class="row justify-content-center my-5">
<a class="btn text-dark" href="index.php">Voltar</a>
</div>
</div>
</body>
</html>