-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstatus_check.php
More file actions
157 lines (150 loc) · 4.52 KB
/
status_check.php
File metadata and controls
157 lines (150 loc) · 4.52 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
include 'databaseconnection.php';
$status_message = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$passport_number = mysqli_real_escape_string($conn, $_POST['passport_number']);
// display application status from passport number
$sql = "
SELECT
a.application_id,
vd.visa_type_id AS visa_type,
a.status
FROM
applications a
INNER JOIN
passport_details pd ON a.application_id = pd.application_id
INNER JOIN
visa_details vd ON a.application_id = vd.application_id
WHERE
pd.passport_number = '$passport_number'
";
$result = mysqli_query($conn, $sql);
if ($result && mysqli_num_rows($result) > 0) {
$row = mysqli_fetch_assoc($result);
$application_id = $row['application_id'];
$visa_type = $row['visa_type'];
$status = $row['status'];
} else {
$status_message = "No application found for the provided passport number.";
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Check Visa Application Status</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f2f2f2;
margin: 0;
padding: 0;
}
.container {
max-width: 600px;
margin: 50px auto;
padding: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
h2 {
text-align: center;
color: crimson;
}
form {
display: flex;
flex-direction: column;
gap: 15px;
}
label {
font-weight: bold;
color: darkblue;
}
input {
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
font-size: 16px;
}
header {
background-color: darkblue;
color: white;
padding: 15px 20px;
display: flex;
justify-content: space-between;
align-items: center;
}
header a {
color: white;
text-decoration: none;
font-weight: bold;
}
header a:hover {
text-decoration: underline;
}
.banner {
width: 105%;
max-height:252px ;
object-fit: cover;
}
button {
background-color: crimson;
color: white;
padding: 12px;
font-size: 16px;
font-weight: bold;
border: none;
border-radius: 5px;
cursor: pointer;
}
button:hover {
background-color: darkred;
}
.result {
margin-top: 20px;
padding: 15px;
background-color: #f9f9f9;
border: 1px solid #ddd;
border-radius: 5px;
}
.result h3 {
margin: 0 0 10px;
color: darkblue;
}
.result p {
margin: 5px 0;
}
.error {
color: red;
text-align: center;
margin-top: 10px;
}
</style>
</head>
<body>
<header>
<div><a href="index.html">Visa Application System</a></div>
<div><a href="admin.php">Admin Login</a></div>
</header>
<img src="banner.png"our banner" class="banner">
<div class="container">
<h2>Check Visa Application Status</h2>
<form method="POST">
<label for="passport_number">Enter Passport Number:</label>
<input type="text" id="passport_number" name="passport_number" placeholder="Passport Number" required>
<button type="submit">Check Status</button>
</form>
<?php if (isset($application_id)): ?>
<div class="result">
<h3>Application Details:</h3>
<p><strong>Application Number:</strong> <?= htmlspecialchars($application_id); ?></p>
<p><strong>Visa Type:</strong> <?= htmlspecialchars($visa_type); ?></p>
<p><strong>Visa Status:</strong> <?= htmlspecialchars($status); ?></p>
</div>
<?php elseif ($status_message): ?>
<div class="error"><?= htmlspecialchars($status_message); ?></div>
<?php endif; ?>
</div>
</body>
</html>