-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
56 lines (46 loc) · 1.52 KB
/
index.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
<?php
if (isset($_SESSION['userid'])) {
header("Location: pages/home.php");
exit();
}
include_once 'includes/header.inc.php';
?>
<body id="index">
<section>
<div class="container">
<div class="container-2">
<div>
<h4>LOGG INN</h4>
</div>
<br>
<div>
<form action="includes/login.inc.php" method="post">
<div>
<label for="email">Email:</label>
<input type="text" name="email" placeholder="E-post">
</div>
<div>
<label for="pwd">Password:</label>
<input type="password" name="pwd" placeholder="Passord">
</div>
<br>
<button type="submit" name="submit" class="submit-btn">LOGG INN</button>
</form>
</div>
<br>
<?php
if (isset($_GET["error"])) {
if ($_GET["error"] == "emptyinput") {
echo "<p>Write in your email and password!</p>";
} else if ($_GET["error"] == "usernotfound") {
echo "<p>Wrong Email or Password!</p>";
}
}
?>
</div>
</div>
</section>
</body>
<?php
include_once 'includes/footer.inc.php';
?>