-
Notifications
You must be signed in to change notification settings - Fork 12
/
signin.php
55 lines (53 loc) · 2 KB
/
signin.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
<?php
include 'config/constants.php';
$username_email = $_SESSION['signin-data']['username_email'] ?? null;
$password = $_SESSION['signin-data']['password'] ?? null;
unset($_SESSION['signin-data']);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>UNDEREMPLOYED</title>
<!-- CUSTOM STYLESHEET -->
<link rel="stylesheet" href="./css/style.css">
<!-- ICONSCOUT CDN -->
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.0/css/line.css">
<!-- GOOGLE FONT(MONTSERATE) -->
<link href="https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,800;1,700&display=swap" rel="stylesheet">
</head>
<body>
<section class="form__section">
<div class="container form__section-container">
<h2>Sign In</h2>
<?php
if(isset($_SESSION['signup-success'])):
?>
<div class="alert__message success">
<p>
<?= $_SESSION['signup-success'];
unset($_SESSION['signup-success']);
?>
</p>
</div>
<?php elseif(isset($_SESSION['signin'])): ?>
<div class="alert__message error">
<p>
<?=$_SESSION['signin'];
unset($_SESSION['signin']);
?>
</p>
</div>
<?php endif; ?>
<form action="<?= ROOT_URL ?>signin-logic.php" method="POST">
<input type="text" name="username_email" value='<?= $username_email ?>' placeholder="Username or Email">
<input type="password" name="password" value='<?= $password ?>' placeholder=" Password">
<button type="submit" class="btn" name="submit">Sign in</button>
<small>Don't have an account? <a href="signup.php">Sign up</a></small>
</form>
</div>
</section>
</body>
</html>