-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPesquisaCliEmpresaID.php
97 lines (90 loc) · 4.12 KB
/
PesquisaCliEmpresaID.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
<?php
include "Confere_2.php";
include ('cabecalho2.php');
?>
<title>Pesquisar Empresas por e-mail</title>
<div style="background-color: #343a40; width:100%; height: 100%;">
<h2 style="color:white; text-align:center;">Pesquisar Clientes por ID</h2>
<table class="table table-hover table-dark" border="1">
<tr>
<th style="color:white; text-align:center;">Nome da Empresa</th>
<th style="color:white; text-align:center;">CNPJ</th>
<th style="color:white; text-align:center;">Telefone</th>
<th style="color:white; text-align:center;">Email</th>
<th style="color:white; text-align:center;">ID</th>
<th style="color:white; text-align:center;">Descrição</th>
</tr>
<?php
include "conexao.php";
$cliente= $_REQUEST["txtcliente"];
$sql="SELECT * FROM clientesEmpresas where id_clienteEmpresa like '%$cliente%'";
if($result=$mysqli->query($sql)){
while($row=$result->fetch_assoc()){
echo '<tr>';
echo '<td>' .$row['nome']. '</td>';
echo '<td>' .$row['cnpj']. '</td>';
echo '<td>' .$row['telefone']. '</td>';
echo '<td>' .$row['email']. '</td>';
echo '<td>' .$row["id_clienteEmpresa"]. '</td>';
echo '<td>' .$row["descricao"]. '<td>';
echo '</tr>';
}
}
?>
</table>
<form method="post" action="PesquisaCliEmpresaID.php">
<table class="table table-hover table-dark" border="1">
<tr>
<td style="text-align:right">Nova busca:</td>
<td><input type="text" name="txtcliente" size="40" /></td>
</tr>
<tr>
<td style="text-align:right"> </td>
<td><input class="btn btn-primary btn-lg" type="submit" value="PESQUISAR" /></td>
</tr>
</form>
<form method="post" action="ApagaCompleto.php">
<input type="hidden" id="tabcliempfun" name="tabcliempfun" value="clientesEmpresas">
<input type="hidden" id="idcliempfun" name="idcliempfun" value="id_clienteEmpresa">
<tr>
<td style="text-align:right">ID da Empresa:</td>
<td><input type="text" name="id" size="5"></td>
</tr>
<tr>
<td style="text-align:right"> </td>
<td><input class="btn btn-primary btn-lg" type="submit" value="APAGAR" /></td>
</tr>
</form>
<form method="post" action="AlteraDados.php">
<input type="hidden" id="tabcliempfun" name="tabcliempfun" value="clientesEmpresas">
<input type="hidden" id="idcliempfun" name="idcliempfun" value="id_clienteEmpresa">
<tr>
<td style="text-align:right">ID da empresa:</td>
<td><input type="text" name="id" size="5"></td>
</tr>
<tr>
<td style="text-align:right">Alterar dado:</td>
<td>
<select name="dado">
<option value="nome">Nome</option>
<option value="cnpj">CNPJ</option>
<option value="telefone">Telefone</option>
<option value="email">Email</option>
<option value="descricao">Descricao</option>
</select>
</td>
</tr>
<tr>
<td style="text-align:right">Novo dado:</td>
<td><input type="text" name="novodado"></td>
</tr>
<tr>
<td style="text-align:right"> </td>
<td><input class="btn btn-primary btn-lg" type="submit" value="ALTERAR" /></td>
</tr>
</table>
</form>
</div>
<?php
include ('rodape.php');
?>