-
Notifications
You must be signed in to change notification settings - Fork 4
/
Register.php
145 lines (118 loc) · 5.37 KB
/
Register.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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<?php
//starting the session
session_start();
?>
<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>Dressingnity Registration</title>
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<!-- RemixIcon CDN -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/fonts/remixicon.css" rel="stylesheet">
<!-- Font Awesome CDN -->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.5.0/css/all.css"
integrity="sha384-B4dIYHKNBt8Bc12p+WXckhzcICo0wtJAoU8YZTY5qE0Id1GSseTk6S+L3BlXeVIU" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css">
<!-- DarkReader JavaScript CDN -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script>
<!-- Custom CSS -->
<link rel="stylesheet" href="CSS/Styles.css">
<link rel="stylesheet" href="CSS/Login.css">
<!-- Favicon -->
<link rel="icon" href="Images/SVG Samples/Dressingnity recolor Logo.png">
</head>
<!-- Navbar Starts -->
<?php
include('Partials/Navbar.php')
?>
<!-- Navbar Ends -->
<div class="wrapper">
<header>Registration</header>
<!-- <form action="Login.php"> -->
<!-- Registration Form start -->
<form method="POST" action="save_member.php" class="login-form">
<div class="field email">
<div class="input-area Play_font">
<input type="text" placeholder="Email Address" required="required" name="email">
<i class="icon fas fa-envelope"></i>
<i class="error error-icon fas fa-exclamation-circle"></i>
</div>
<div class="error error-txt Play_font">Email can't be blank</div>
</div>
<div class="field username">
<div class="input-area Play_font">
<input type="text" placeholder="Username" required="required" name="username">
<i class="icon fa-solid fa-user"></i>
<i class="error error-icon fas fa-exclamation-circle"></i>
</div>
<div class="error error-txt Play_font">Username can't be blank</div>
</div>
<div class="field password">
<div class="input-area Play_font">
<input type="password" name="password" required="required" placeholder="Password">
<i class="icon fas fa-lock"></i>
<i class=" Play_font error error-icon fas fa-exclamation-circle" aria-hidden="true"></i>
</div>
<div class="error error-txt Play_font">Password can't be blank</div>
</div>
<div class="field firstname">
<div class="input-area Play_font">
<input type="text" name="firstname" required="required" placeholder="FirstName">
<i class="icon fa fa-user-plus" aria-hidden="true"></i>
<i class=" Play_font error error-icon fas fa-exclamation-circle" aria-hidden="true"></i>
</div>
<div class="error error-txt Play_font">First Name can't be blank</div>
</div>
<div class="field lastname">
<div class="input-area Play_font">
<input type="text" name="lastname" required="required" placeholder="Last Name">
<i class="icon fa fa fa-user-plus" aria-hidden="true"></i>
<i class=" Play_font error error-icon fas fa-exclamation-circle" aria-hidden="true"></i>
</div>
<div class="error error-txt Play_font">Last Name can't be blank</div>
</div>
<?php
//checking if the session 'success' is set. Success session is the message that the credetials are successfully saved.
if(ISSET($_SESSION['success'])){
?>
<!-- Display registration success message -->
<div class="alert alert-success">
<?php echo $_SESSION['success']?>
</div>
<?php
//Unsetting the 'success' session after displaying the message.
unset($_SESSION['success']);
}
?>
<!-- <div class="pass-txt Play_font"><a href="#">Forgot password?</a></div> -->
<input name="register" type="submit" value="Register">
<!-- Link for redirecting to Login Page -->
<a href="Login.php">Already a member? Log in here...</a>
</form>
</div>
<!-- Footer Starts -->
<?php
include('Partials/Footer.php')
?>
<!--Footer Ends-->
<!-- Cookie Banner -->
<?php
include('Partials/Cookies.php')
?>
<!-- End of Cookie Banner -->
<!-- Bootstrap JS Bundle -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous"></script>
<!-- Bootstrap JS Bundle -->
<!-- Custom JS -->
<script src="JavaScript/Cookies.js"></script>
<!-- Custom JS -->
<!-- Darkmode-Toggle -->
<script src="JavaScript/DarkModeToggle.js"></script>
</body>
</html>