-
Notifications
You must be signed in to change notification settings - Fork 0
/
reg_test.php
50 lines (48 loc) · 2.3 KB
/
reg_test.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
<?php
session_start();
?>
<?php require_once('cont/header.php'); ?>
<div class="form">
<div class="title">Welcome</div>
<div class="subtitle">Create your account : </div>
<form action="reg_action_test.php" method="POST">
<div class="input-container ic1">
<input required name="first_name" id="first_name" class="input" type="text" placeholder=" " maxlength="30"/>
<label for="first_name" class="placeholder">First name</label>
</div>
<div class="input-container ic2">
<input required name="last_name" id="last_name" class="input" type="text" placeholder=" " maxlength="30"/>
<label for="last_name" class="placeholder">Last name</label>
</div>
<div class="input-container ic2">
<input required name="nic" id="nic" class="input" type="text" placeholder=" " maxlength="20"/>
<label for="nic" class="placeholder">NIC</label>
</div>
<div class="input-container ic2">
<input required name="city" id="city" class="input" type="text" placeholder=" " maxlength="30"/>
<label for="city" class="placeholder">City</label>
</div>
<div class="input-container ic2">
<input required name="email" id="email" class="input" type="text" placeholder=" " maxlength="30"/>
<label for="email" class="placeholder">E-mail</label>
</div>
<div class="input-container ic2">
<input required name="password" id="id_password" class="input" type="password" placeholder=" " maxlength="20"/>
<i class="far fa-eye" id="togglePassword" style="cursor: pointer;"></i>
<label for="password" class="placeholder">Password</label>
</div>
<input class="submit" type="submit" value="Register">
</form>
</div>
<script>
const togglePassword = document.querySelector('#togglePassword');
const password = document.querySelector('#id_password');
togglePassword.addEventListener('click', function (e) {
// toggle the type attribute
const type = password.getAttribute('type') === 'password' ? 'text' : 'password';
password.setAttribute('type', type);
// toggle the eye slash icon
this.classList.toggle('fa-eye-slash');
});
</script>
<?php require_once('cont/footer.php'); ?>