-
Notifications
You must be signed in to change notification settings - Fork 1
/
submitFeedback.php
40 lines (36 loc) · 1.22 KB
/
submitFeedback.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
<?php
include 'config/DBconfig.php';
if(isset($_POST['submit']))
{
$questionNo = $_POST['questionNo'];
$rating_id = $_POST['rating'];
$query = "INSERT INTO tbl_feedback_data (question_no,rating_id) VALUES ('$questionNo','$rating_id')";
if($questionNo!=0)
{
if($rating_id!=0)
{
$query_run = mysqli_query($connect, $query);
if($query_run)
{
echo "<script>alert('Feedback Submited Successfully...')</script>";
echo "<script>window.open('views/feedbackForm.php','_self')</script>";
}
else
{
echo "Error: ".mysqli_error($connect);
}
}
else
{
echo "<script>alert('Please select the Rating!')</script>";
echo "<script>window.open('views/feedbackForm.php','_self')</script>";
}
}
else
{
echo "<script>alert('Please select the Question!')</script>";
echo "<script>window.open('views/feedbackForm.php','_self')</script>";
}
mysqli_close($connect);
}
?>