-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
64 lines (60 loc) · 2.4 KB
/
Copy pathindex.php
File metadata and controls
64 lines (60 loc) · 2.4 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
<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Registration Form</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="container">
<h1>Registration Form</h1>
<?php if(isset($_SESSION['message'])): ?>
<div class="alert"> <?php echo $_SESSION['message']; unset($_SESSION['message']); ?> </div>
<?php endif; ?>
<form action="process.php" method="POST" id="regForm">
<div class="row">
<div class="col">
<label>First Name</label>
<input type="text" name="first_name" required>
</div>
<div class="col">
<label>Last Name</label>
<input type="text" name="last_name" required>
</div>
<div class="col">
<label>Department</label>
<select name="department">
<option>Computer Science</option>
<option>Engineering</option>
<option>Business</option>
</select>
</div>
</div>
<div class="row">
<div class="col">
<label>Gender</label>
<input type="radio" name="gender" value="Male"> Male<br>
<input type="radio" name="gender" value="Female"> Female<br>
</div>
<div class="col">
<label>Hobbies</label>
<input type="checkbox" name="hobbies[]" value="Reading"> Reading<br>
<input type="checkbox" name="hobbies[]" value="Sports"> Sports<br>
<input type="checkbox" name="hobbies[]" value="Music"> Music<br>
<input type="checkbox" name="hobbies[]" value="Travel"> Travel
</div>
<div class="col">
<label>Others</label>
<textarea name="others" rows="4"></textarea>
</div>
</div>
<div class="buttons">
<button type="submit" name="register" class="btn-reg">Register</button>
<button type="button" class="btn-clear" onclick="clearForm()">Clear</button>
</div>
</form>
</div>
<script src="script.js"></script>
</body>
</html>