-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjobApplication.php
executable file
·88 lines (76 loc) · 2.7 KB
/
jobApplication.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
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
<?php
require('backend/log.php');
require('backend/session.php');
require('backend/user.php');
$username = startSession();
isLoggedIn($username, 'index.php');
require('backend/connection.php');
require('backend/head.php');
require('backend/navbar.php');
?>
<!DOCTYPE html>
<html>
<head>
<?php head("Job Application") ?>
</head>
<body>
<?php navbar($username) ?>
<div class="page-container">
<div class="outlined-box">
<?php
$job_id = urldecode($_GET["id"]);
// $job_serve = $conn->prepare("SELECT $job_id FROM `Jobs`");
$query = "SELECT * FROM `Jobs`";
$job_serve = mysqli_query($conn, $query);
//console_log($job_info);
$job_title = "";
$job_professor = "";
$job_description = "";
// console_log($job_id);
while ($jobs = mysqli_fetch_assoc($job_serve)) {
// console_log($jobs);
if ($jobs["id"] == $job_id) {
$job_title = $jobs["Title"];
$job_professor = $jobs["Professor"];
$job_description = $jobs["Description"];
break;
}
}
// foreach (mysqli_fetch_assoc($job_serve) as $jobs){
// console_log($job_info);
// if ($jobs["id"] == $job_id){
// $job_title = $jobs["Title"];
// $job_professor = $jobs["Professor"];
// $job_description = $jobs["Description"];
// }
// }
echo "<b>Title: </b>";
echo $job_title;
echo "<br>";
echo "<b>Employer: </b>";
echo $job_professor;
echo "<br>";
echo "<b>Description: </b>";
echo $job_description;
echo "<br>";
echo "<br>";
?>
<form method="GET" action="index.php">
Name: <input class="login-info-box" type="text" name="application_name">
<br>
<br>
Experience: <br>
<input type="text" class="login-info-box" style="height:140px; width:300px" name="application_experience">
<br>
<br>
Why you want this job: <br>
<input type="text" class="login-info-box" style="height:140px; width:300px" name="application_reason">
<br>
<br>
<input type="hidden" name="getId" value=<?php echo $job_id; ?>>
<button type="submit" class="base-button green-button">Submit Application</button>
</form>
</div>
</div>
</body>
</html>