-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconsole-pin.php
More file actions
56 lines (55 loc) · 1.62 KB
/
console-pin.php
File metadata and controls
56 lines (55 loc) · 1.62 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
<?php
session_start();
if(isset($_SESSION['consolelogged'])) {
header('Location: console');
exit();
}
if(isset($_POST['one']) && isset($_POST['one']) && isset($_POST['one']) && isset($_POST['one'])) {
if($_POST['one'] == 1 && $_POST['two'] == 9 && $_POST['three'] == 1 && $_POST['four'] == 4) {
$_SESSION['consolelogged'] = true;
header('Location: console');
exit();
} else {
$_SESSION['pinwrong'] = true;
header('Location:console-pin.php');
exit();
}
}
?>
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="css/logowanie.min.css">
</head>
<body>
<form method="POST">
<p class="title">Wpisz pin</p>
<div class="input-container">
<input name="one" type="number" min="0" max="9">
<input name="two" type="number" min="0" max="9">
<input name="three" type="number" min="0" max="9">
<input name="four" type="number" min="0" max="9">
</div>
<button type="submit">
<div class="button-white-fill"></div>
<div class="button-fill"></div>
<div class="submit-text">WYŚLIJ</div>
</button>
</form>
<script src="js/pincode.js"></script>
<?php
if(isset($_SESSION['pinwrong']))
{
echo "<div class='errbox'>".
"<img src='img/error.png' alt='error'>".
"Niepoprawny PIN!".
"</div>";
unset($_SESSION['pinwrong']);
exit();
}
?>
</body>
</html>