-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsenha_meus_dados.php
64 lines (55 loc) · 2.4 KB
/
senha_meus_dados.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
<?php
include './verifica_login.php';
$email = $_SESSION['usuario'];
// print_r($email);
include './conexao.php';
include './cabecalhoCliente.php';
$sql = "SELECT * FROM tb_cliente WHERE email_cliente = '$email'";
$resultado = mysqli_query($con, $sql);
$row = mysqli_fetch_assoc($resultado);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="./css/style.css">
<link rel="stylesheet" href="./css/form.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<title>Meus Dados</title>
</head>
<body class="corpo">
<form class="formulario" action="altera_senha_meus_dados.php" method="post" style="margin-bottom: 5%;">
<h1 class="mb-3">Meus dados</h1>
<div>
<a style="text-decoration:none;" class="btn btn-primary" href="endereco_meus_dados.php">Endereço</a>
<a style="text-decoration:none;" class="btn btn-primary" href="meus_dados.php">Meus dados</a>
</div>
<?php
if (isset($_SESSION['senha_errada'])) :
?>
<div class="form-group" style="text-align: center; color:red;">
<label for="exampleInputEmail1">*Senha está errada*</label>
</div>
<?php
endif;
unset($_SESSION['senha_errada']);
?>
<div>
<input type="hidden" class="form-control" required id="exampleInputEmail1" aria-describedby="emailHelp" name="id_cliente" value="<?php echo $row['id_cliente']; ?>">
</div>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Senha Atual:</label>
<input type="text" class="form-control" required id="exampleInputEmail1" aria-describedby="emailHelp" name="senha_atual">
</div>
<div class="mb-3">
<label for="exampleInputEmail1" class="form-label">Nova senha:</label>
<input type="text" class="form-control" required id="exampleInputEmail1" aria-describedby="emailHelp" name="senha_nova">
</div>
<div>
<button type="submit" class="btn botao-form">Salvar</button>
<a style="text-decoration:none;" class="btn btn-primary" href="homeCliente.php">Voltar</a>
</div>
</form>
</body>
<?php include 'rodape.php'; ?>
</html>