-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstuFeedback.php
More file actions
153 lines (138 loc) · 4.87 KB
/
Copy pathstuFeedback.php
File metadata and controls
153 lines (138 loc) · 4.87 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php
if(!isset($_SESSION)){
session_start();
}
include_once('../dbConnection.php');
if(isset($_SESSION['is_login'])){
$stuLogEmail=$_SESSION['stuLogEmail'];
}else{
echo "<script>location.href='../index.php' </script>";
}
if(isset($stuLogEmail)){
$sql="SELECT * FROM students WHERE stu_email = '$stuLogEmail'";
$result=$conn->query($sql);
$row=$result->fetch_assoc();
$stu_img=$row['stu_img'];
$stuId=$row['stu_id'];
// $stuName=$row['stu_name'];
// $stuOcc=$row['stu_occ'];
}
if(isset($_REQUEST['submitFeedbackBtn'])){
if(($_REQUEST['f_content']=="")){
$passmsg='<div id="warning">All Fields are Required</div>';
}
else{
$fcontent=$_REQUEST["f_content"];
$sql="INSERT INTO feedback (f_content,stu_id) VALUES ('$fcontent', '$stuId')";
if($conn->query($sql)==TRUE){
$passmsg='<div id="success">Feedback Submitted Successfully</div>';
}
else{
$passmsg='<div id="danger">Unable to Submit</div>';
}
}
}
?>
<!--========================================================================== Sidebar -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>CodingHour||Admin Dashboard</title>
<link rel="stylesheet" href="../css/studentDashboard.css"/>
<link rel="stylesheet" href="../css/stuFeedback.css"/>
<!-- <link rel="stylesheet" href="../css/studentProfile.css"/> -->
<!-- <link rel="stylesheet" href="../css/adminDashboardStyle.css" /> -->
<!-- <link rel="stylesheet" href="../css/addCourse.css"/> -->
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
/>
<link
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@100;200;300;400;500;600;700;800;900&display=swap"
rel="stylesheet"
/>
</head>
<body>
<!--============================================== SideBar====================================================== -->
<div class="container">
<nav>
<ul>
<li class="header-title">
<h1 class="logo">
<a href="../index.php"> <img src="../Admin/PIC/logo.png" /></a>
<span class="sidebar-head">CodingHour</span></h1
>
</li>
<li>
<!-- <div class="profile-pic"> -->
<img class="profile-pic" src="<?php echo $stu_img ?>" alt="studentImage">
<!-- </div> -->
</li>
<li>
<a href="studentProfile.php" >
<i class="fas fa-tachometer-alt"></i>
<span class="sidebar-item ">Profile</span>
</a>
</li>
<li>
<a href="myCourses.php">
<i class="fas fa-book-open"></i>
<span class="sidebar-item">My Learnings</span>
</a>
</li>
<li>
<a href="stuFeedback.php" class="link-active">
<i class="fab fa-accessible-icon"></i>
<span class="sidebar-item link-active">Feedback</span>
</a>
</li>
<li>
<a href="stuChangePassword.php">
<i class="fas fa-key"></i>
<span class="sidebar-item">Change Password</span>
</a>
</li>
<li>
<a href="../logout.php" class="logout">
<i class="fas fa-sign-out-alt"></i>
<span class="sidebar-item">Logout</span>
</a>
</li>
</ul>
</nav>
<div class="course-add">
<form action="" method="POST" enctype="multipart/form-data">
<!--====================================================== Error Message ============================================================-->
<?php if(isset($passmsg)){
echo $passmsg;
}
?>
<!--====================================================== Error Message ============================================================-->
<div class="form-group">
<label class="form-display" for="stuId">Student ID</label>
<input
type="text"
class="form-control"
id="stuId"
name="stuId"
value="<?php if(isset($stuId)) {echo $stuId;}?>" readonly>
</div>
<div class="form-group">
<label class="form-display" for="f_content"
>Write Feedback</label
>
<textarea id="f_area"
class="form-control"
id="f_content"
name="f_content"
></textarea>
</div>
<button type="submit" class ="btn btn-submit" name="submitFeedbackBtn">Submit</button>
</form>
</div>
</div>
</body>
</html>