-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheckindate.php
42 lines (30 loc) · 2 KB
/
checkindate.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
<META http-equiv="refresh" content="4;checkin.php">
<link rel="stylesheet" type="text/css" href="styles/glance.css">
<style type="text/css">
* {
background-color:#00E676;
}
</style>
<?php
include('db.php');
$dataset = "<img src=\"images/logo/coffee.png\">";
$identification = $_REQUEST['id'];
$theNewNote = mysqli_real_escape_string($connection, $_REQUEST['secondNote']);
$reuse = mysqli_real_escape_string($connection, $_REQUEST['reuse']);
$datecode = mysqli_real_escape_string($connection, $_REQUEST['date_code']);
$firmware = mysqli_real_escape_string($connection, $_REQUEST['firmware']);
$issues = mysqli_real_escape_string($connection, $_REQUEST['issues']);
mysqli_query($connection, "INSERT INTO logged_info (date_returned) VALUES ('$identification') = CURDATE() WHERE tid = $identification;");
mysqli_query($connection, "INSERT INTO logged_info (note2) VALUES ('$theNewNote') WHERE tid = $identification;");
mysqli_query($connection, "INSERT INTO logged_info (reuse) VALUES ('$reuse') WHERE tid = $identification;");
mysqli_query($connection, "INSERT INTO logged_info (date_code) VALUES ('$datecode') WHERE tid = $identification;");
mysqli_query($connection, "INSERT INTO logged_info (firmware_version) VALUES ('$firmware') WHERE tid = $identification;");
mysqli_query($connection, "INSERT INTO logged_info (issues) VALUES ('$issues') WHERE tid = $identification;");
mysqli_query($connection, "UPDATE logged_info SET date_returned = CURDATE() WHERE tid = $identification;");
mysqli_query($connection, "UPDATE logged_info SET note2 = '$theNewNote' WHERE tid = $identification;");
mysqli_query($connection, "UPDATE logged_info SET reuse = '$reuse' WHERE tid = $identification;");
mysqli_query($connection, "UPDATE logged_info SET date_code = '$datecode' WHERE tid = $identification;");
mysqli_query($connection, "UPDATE logged_info SET firmware_version = '$firmware' WHERE tid = $identification;");
mysqli_query($connection, "UPDATE logged_info SET issues = '$issues' WHERE tid = $identification;");
echo "All set!";
?>