forked from nwudoebuka/loomis
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstop.php
66 lines (44 loc) · 1.2 KB
/
stop.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
<?php
$servername = "localhost";
$username = "flypadic_001";
$password = "An0therrichard3303";
$dbname = "flypadic_001";
$stop = $_POST['stop'];
$status = $_POST['status'];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
if (isset($_POST['stop'])){
$sql = "SELECT * FROM tracking WHERE trackingid='$stop'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$sql = "UPDATE tracking SET status='$status' WHERE trackingid='$stop'";
if ($conn->query($sql) === TRUE) {
// Process your response here
echo '<script>
alert("CHANGES MADE SUCESSFULLY");
</script>
</script> <script>window.location =
"https://loomislogistics.com/register.php"</script>';
exit();
}
}else{
echo '<script>
alert("Wrong Tracking ID Crosscheck");
</script>
</script> <script>window.location =
"https://loomislogistics.com/register.php"</script>';
exit();
}
}else{
echo '<script>
alert("Missing Token");
</script>
</script> <script>window.location =
"https://loomislogistics.com"</script>';
exit();
}
?>