-
Notifications
You must be signed in to change notification settings - Fork 20
/
usersignup.php
executable file
·182 lines (147 loc) · 4.26 KB
/
usersignup.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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<?php session_start(); ?>
<!DOCTYPE html>
<html>
<head>
<style>
body{background: #2C3E50;
background: -webkit-linear-gradient(to left, #4CA1AF, #2C3E50);
background: linear-gradient(to left, #4CA1AF, #2C3E50);
}
.form
{
width: 340px;
height: 700px;
background: #e6e6e6;
border-radius: 8px;
box-shadow: 0 0 40px -10px #000;
margin: auto;
margin-top: 2%;
padding: 20px 30px;
max-width: calc(100vw - 40px);
box-sizing: border-box;
font-family: 'Montserrat',sans-serif;
position: relative;
}
h2
{
margin:10px 0;
padding-bottom:10px;
width:180px;
color:#78788c;
border-bottom:3px solid #78788c
}
h4
{
margin:10px 0;
padding-bottom:10px;
width:250px;
color:#444;
border-bottom:3px solid #78788c
}
input
{
width:100%;
padding:10px;
box-sizing:border-box;
background:none;
outline:none;
resize:none;
border:0;
font-family:'Montserrat',sans-serif;transition:all .3s;
border-bottom:2px solid #bebed2
}
input:focus{border-bottom:2px solid #78788c}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {-webkit-box-shadow: 0 0 0 30px #e6e6e6 inset !important;}
p:before{content:attr(type);
display:block;margin:28px 0 0;
font-size:14px;color:#5a5a5a}
button{float:right;padding:8px 12px;margin:8px 0 0;
font-family:'Montserrat',sans-serif;
border:2px solid #78788c;
background:0;
color:#5a5a6e;
cursor:pointer;
transition:all .3s
}
button:hover{background:#78788c;color:#fff}
div{content:'Hi';
position:absolute;
bottom:-15px;right:-20px;background:#50505a;
color:#fff;
width:320px;
padding:16px 4px 16px 0;
border-radius:6px;
font-size:13px;
box-shadow:10px 10px 40px -14px #000
}
span{margin:0 5px 0 15px}
#snackbar {
visibility: hidden;
min-width: 250px;
margin-left: -125px;
background-color: #333;
color: #fff;
text-align: center;
border-radius: 2px;
padding: 16px;
position: fixed;
z-index: 1;
left: 50%;
bottom: 30px;
}
.show {
visibility: visible !important;
-webkit-animation: fadein 0.5s, fadeout 0.5s 2.5s;
animation: fadein 0.5s, fadeout 0.5s 2.5s;
}
@-webkit-keyframes fadein {
from {bottom: 0; opacity: 0;}
to {bottom: 30px; opacity: 1;}
}
@keyframes fadein {
from {bottom: 0; opacity: 0;}
to {bottom: 30px; opacity: 1;}
}
@-webkit-keyframes fadeout {
from {bottom: 30px; opacity: 1;}
to {bottom: 0; opacity: 0;}
}
@keyframes fadeout {
from {bottom: 30px; opacity: 1;}
to {bottom: 0; opacity: 0;}
}
</style>
</head>
<body>
<form class="form" action="./core/signupcheck.php" method="post">
<div id="snackbar"><?php
if (isset($_SESSION['error']))
echo $_SESSION['error'];
if (isset($_SESSION['success']))
echo $_SESSION['success'];
?></div>
<h2>USER SIGNUP</h2>
<h4>LEAVE APPLICATION PORTAL</h4>
<?php if (isset($_SESSION['error']) || isset($_SESSION['success'])){
echo '<script>function myFunction() {
var x = document.getElementById("snackbar")
x.className = "show";
setTimeout(function(){ x.className = x.className.replace("show", ""); }, 3000);
}
myFunction();
</script>';
session_destroy();
}
?>
<p type="Name:"><input placeholder="Write your name here.." name="Name" required/></p>
<p type="Enrollment No:"><input placeholder="Enrollment Number here.." name="Enroll" required/></p>
<p type="Email:"><input type="email" placeholder="Write your college Email here.." name="Email" required/></p>
<p type="Password:"><input placeholder="Enter password" name="Password" type="password" required/></p>
<p type="RE-ENTER Password:"><input placeholder="Enter password again" name="Passwordagain" type="password" required/></p>
<button type="submit" name="submit">Submit</button>
</form>
</body>
</html>