-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUnapply.php
More file actions
26 lines (20 loc) · 747 Bytes
/
Unapply.php
File metadata and controls
26 lines (20 loc) · 747 Bytes
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
<?php
include 'connect.php';
session_start();
$serialNumber = $_GET['serialNumber'];
$workerId = $_GET['workerId'];
$jobId = $_GET['jobId'];
$getJobDetails = "SELECT * FROM applied_workers WHERE jobId = $jobId AND workerId = $workerId";
$getJobDetailsResult = mysqli_query($conn, $getJobDetails);
if ($getJobDetailsResult && mysqli_num_rows($getJobDetailsResult) > 0) {
$isApplied = 0;
$unApply = "UPDATE applied_workers SET isApplied = '$isApplied' WHERE jobId = $jobId AND workerId = $workerId AND serialNumber = $serialNumber";
$unApplyResult = mysqli_query($conn, $unApply);
if ($unApplyResult) {
header("Location: ./Cart.php");
}
else {
echo "Error unapplying worker: " . $conn->error;
}
}
?>