-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathEmpReg.php
173 lines (170 loc) · 3.87 KB
/
EmpReg.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
<?php
include("connection/connection.php");
error_reporting(0);
?>
<?php
$showAlert=false;
$showError=false;
$compName = $_GET['compName'];
$compEmail = $_GET['compEmail'];
$compPass = $_GET['compPass'];
$confirmPass = $_GET['confirmPass'];
$compDesc = $_GET['compDesc'];
if($compPass === $confirmPass){
$query = "INSERT INTO `empreg` VALUES ('$compName','$compEmail','$compDesc','$compPass','$confirmPass')";
$result = mysqli_query($conn, $query);
}
else{
$showError = "password doesn't match";
}
if($result){
$showAlert=true;
}
?>
<!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>Register</title>
<link rel="stylesheet" href="css/style_register.css">
</head>
<body>
<style>
@import url("https://fonts.googleapis.com/css?family=Poppins:400,500,600,700&display=swap");
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "Poppins", sans-serif;
}
body {
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background: linear-gradient(to right, #004d39 0%, #124143 100%);
}
.wrapper {
position: relative;
max-width: 430px;
width: 100%;
background: #fff;
padding: 34px;
border-radius: 6px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
}
.wrapper h2 {
position: relative;
font-size: 22px;
font-weight: 600;
color: #124143;
}
.wrapper form .input-box {
height: 52px;
margin: 18px 0;
}
form .input-box input {
height: 100%;
width: 100%;
outline: none;
padding: 0 15px;
font-size: 17px;
font-weight: 400;
color: #333;
border: 1.5px solid #c7bebe;
border-bottom-width: 2.5px;
border-radius: 6px;
transition: all 0.3s ease;
}
.input-box input:focus,
.input-box input:valid {
border-color: #124143;
}
form .policy {
display: flex;
align-items: center;
}
form h3 {
color: #124143;
font-size: 14px;
font-weight: 500;
margin-left: 10px;
}
.input-box.button input {
color: #fff;
letter-spacing: 1px;
border: none;
background: #124143;
cursor: pointer;
}
.input-box.button input:hover {
background: #124143;
}
form .text h3 {
color: #333;
width: 100%;
text-align: center;
}
form .text h3 a {
color: #124143;
text-decoration: none;
}
form .text h3 a:hover {
text-decoration: underline;
}
.c-received {
padding: 5px 10px;
color: white;
background-color: #124143;
border-radius: 5px;
}
.redness{
background:red;
}
</style>
<div class="wrapper">
<h2>REGISTER</h2>
<form action="#">
<?php
if($showAlert){
echo '<div class="c-received">
<p class="c-receivepara">Registered successfully now you can Login </p>
</div>';
}
if($showError){
echo '<div class="c-received redness">
<p class="c-receivepara">'.$showError.' </p>
</div>';
}
?>
<div class="input-box">
<input type="text" name = "compName" placeholder="Enter company name" required>
</div>
<div class="input-box">
<input type="email" name = "compEmail" placeholder="Enter company email" required>
</div>
<div class="input-box">
<input type="text" name = "compDesc"placeholder="Company description" required>
</div>
<div class="input-box">
<input type="password" name = "compPass" placeholder="Create password" required>
</div>
<div class="input-box">
<input type="password" name = "confirmPass" placeholder="Confirm password" required>
</div>
<div class="policy">
<input type="checkbox">
<h3>I accept all terms & condition</h3>
</div>
<div class="input-box button">
<input type="Submit" value="Register Now">
</div>
<div class="text">
<h3>Already have an account? <a href="EmpLog.php">Login now</a></h3>
</div>
</form>
</div>
</body>
</html>