-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsubmituser.php
More file actions
119 lines (63 loc) · 2.25 KB
/
Copy pathsubmituser.php
File metadata and controls
119 lines (63 loc) · 2.25 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
<?php
require 'session.php';
require 'database.php';
if(isset($_POST['remarks'])){
$remarks = $_POST['textremarks'];
$fileid = $_GET['fileid'];
date_default_timezone_set('asia/manila');
$date=date('d-m-Y');
$time = date("h:i");
$time1 = date('h:i A', strtotime($time));
$date1 = date('F d Y', strtotime($date));
$courseorder = $_GET['courseorder'];
if($remarks != ""){
$sql = "INSERT INTO remarks (Remarks,Date_Added,Time_Added,FileID,UserID) VALUES ('$remarks', '$date1', '$time1', '$fileid','$IuserID')";
$query = mysqli_query($conn,$sql);
if($query){
echo "<script>
alert('Noted!');
window.location.href='facWLAPcourses.php?id=$courseorder';
</script>";
}
else {
echo "Error :" .$sql. "<br>".mysqli_error($conn);
}
}
else{
echo "<script>
alert('please fill-out all fields!');
window.location.href='facWLAPcourses.php?id=$courseorder';
</script>";
}
}
else if(isset($_POST['remarksother'])){
$remarks = $_POST['textremarks'];
$fileid = $_GET['fileid'];
date_default_timezone_set('asia/manila');
$date=date('d-m-Y');
$time = date("h:i");
$time1 = date('h:i A', strtotime($time));
$date1 = date('F d Y', strtotime($date));
$courseorder = $_GET['courseorder'];
if($remarks != ""){
$sql = "INSERT INTO remarks (Remarks,Date_Added,Time_Added,FileID,UserID) VALUES ('$remarks', '$date1', '$time1', '$fileid','$IuserID')";
$query = mysqli_query($conn,$sql);
if($query){
echo "<script>
alert('Noted!');
window.location.href='facWLAPothercourses.php?id=$courseorder';
</script>";
}
else {
echo "Error :" .$sql. "<br>".mysqli_error($conn);
}
}
else{
echo "<script>
alert('please fill-out all fields!');
window.location.href='facWLAPothercourses.php?id=$courseorder';
</script>";
}
}
mysqli_close($conn);
?>