-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdone.php
More file actions
36 lines (33 loc) · 1.15 KB
/
done.php
File metadata and controls
36 lines (33 loc) · 1.15 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
<?php
// Retrieve user information from query parameters
$gender = isset($_POST["gender"]) ? $_POST["gender"] : "";
$firstName = isset($_POST["first_name"]) ? $_POST["first_name"] : "";
$lastName = isset($_POST["first_name"]) ? $_POST["last_name"] : "";
$address = isset($_POST["address"]) ? $_POST["address"] : "";
$skills = isset($_POST["skills"]) ? $_POST["skills"]: "";
$department = isset($_POST["department"]) ? $_POST["department"] : "";
// Function to determine the appropriate title based on gender
function getTitle($gender)
{
return $gender === "male" ? "Mr." : "Miss";
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Registration Done</title>
</head>
<body>
<h1>Thank you <?php echo getTitle($gender) . " " . $firstName . " " . $lastName; ?></h1>
<p>Please review your information:</p>
<p>Name: <?php echo $firstName . " " . $lastName; ?></p>
<p>Address: <?php echo $address; ?></p>
<p>Your skills:</p>
<ul>
<?php foreach ($skills as $skill) : ?>
<li><?php echo $skill; ?></li>
<?php endforeach; ?>
</ul>
<p>Department: <?php echo $department; ?></p>
</body>
</html>