-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsignup.php
32 lines (26 loc) · 1.38 KB
/
signup.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
<?php
include("includes/header.php");
include("includes/input.php");
if(isset($_SESSION['auth'])) {
$role = $_SESSION['role'];
if($role == 0) {
redirect('Already logged in', 'student/index.php');
}
else {
redirect('Already logged in', 'tpo/index.php');
}
}
?>
<div class="w-full h-full flex items-center justify-center min-h-[100vh]">
<form action="functions/authentication.php" method="POST" class="p-5 rounded-lg flex flex-col gap-y-4 border border-neutral-700 bg-neutral-800 w-full m-3 md:w-[400px]">
<h1 class="text-white font-semibold text-3xl text-center mb-4">Signup</h1>
<?= customInput("Full Name", "text", "fullName", "Enter your full name", "", "min-w-full");?>
<?= customInput("Email", "email", "email", "Enter your email", "", "min-w-full");?>
<?= customInput("Password", "password", "password", "Enter your password", "", "min-w-full");?>
<button class="w-full rounded-full bg-green-500 border border-transparent px-3 py-3 disabled:cursor-not-allowed disabled:opacity-50 text-black font-bold hover:opacity-75 transition" type="submit" name="signup">Signup</button>
<p class="text-center text-neutral-500 text-sm mt-3">Already have an account? <a href="login.php" class="underline">Click here</a></p>
</form>
</div>
<?php
include("includes/footer.php");
?>