-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathregistration.php
More file actions
109 lines (95 loc) · 2.78 KB
/
registration.php
File metadata and controls
109 lines (95 loc) · 2.78 KB
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
<?php
include 'db.php';
$msg = "";
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$name = $_POST['full_name'];
$email = $_POST['email'];
$pass = password_hash($_POST['password'], PASSWORD_DEFAULT);
$stmt = $conn->prepare("INSERT INTO applicants_users (full_name, email, password) VALUES (?,?,?)");
$stmt->bind_param("sss", $name, $email, $pass);
if ($stmt->execute()) {
$msg = "Account created! Please wait for Super Admin activation.";
} else {
$msg = "Email already exists!";
}
}
?>
<!DOCTYPE html>
<html>
<head><title>Applicant Registration</title>
<style>
body {
margin: 0;
background: linear-gradient(135deg, orange, yellow);
height: 100vh;
display: flex;
align-items: center;
justify-content: center;
font-family: "Segoe UI", Arial, sans-serif;
}
.login-card {
background: #fff;
width: 350px;
padding: 30px;
border-radius: 12px;
box-shadow: 0 10px 25px rgba(0,0,0,0.2);
text-align: center;
}
.login-card h2 {
margin-bottom: 20px;
color: #333;
}
.login-card input {
width: 90%;
padding: 12px;
margin: 10px 0;
border: 1px solid #ccc;
border-radius: 6px;
font-size: 14px;
}
.login-card button {
width: 100%;
padding: 12px;
margin-top: 15px;
background: orange;
color: #fff;
border: none;
border-radius: 6px;
font-size: 16px;
cursor: pointer;
transition: 0.3s;
}
.login-card button:hover {
background: darkorange;
}
.error {
background: #ffe5e5;
color: #c0392b;
padding: 10px;
border-radius: 6px;
margin-bottom: 15px;
font-size: 14px;
}
.footer {
margin-top: 15px;
font-size: 12px;
color: #888;
}
</style>
</head>
<body>
<div class="login-card">
<h2>Applicant Account Creation</h2>
<form method="POST">
<input type="text" name="full_name" placeholder="Full Name" required><br>
<input type="email" name="email" placeholder="Email" required><br>
<input type="password" name="password" placeholder="Password" required><br>
<button type="submit">Register</button>
</form>
<p style="color:green"><?= $msg ?></p>
<a href="applicant_login.php">Login</a>
<div class="footer">
© <?= date('Y') ?> ICT Unit RSP
</div>
</body>
</html>