-
Notifications
You must be signed in to change notification settings - Fork 0
/
nurse-feedback.php
111 lines (105 loc) · 5.86 KB
/
nurse-feedback.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
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
<?php
include("include/nurse-header.php");
?>
<!--MAIN Content-->
<div class="row clearfix">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class="card">
<div class="header">
<h2>Fill Form <small>Please Provide Us Your Valuable Feedback To Improve Our System </small> </h2>
</div>
<div class="body">
<form action="#" method="post">
<div class="col clearfix">
<div class="col-sm-3">
<div class="input-group">
<input type="text" class="form-control" placeholder="Pharmacist" value="Nurse" name="usrtyp" >
</div>
</div>
</div>
<br>
<div class="col clearfix">
<div class="col-sm-4">
<div class="form-group m-t-24">
<input type="text" class="form-control" placeholder="Your Name" name="uname">
</div>
</div>
<div class="col-sm-8">
<div class="form-group m-t-24">
<textarea rows="2" class="form-control" placeholder="Feedback" name="feedback"></textarea>
</div>
</div>
<div class="col-sm-8">
<div class="form-group">
<label>Rate Us</label>
<br/>
<label >
<input type="radio" name="rate" value="10">
10
</label>
<label >
<input type="radio" name="rate" value="20">
20
</label>
<label >
<input type="radio" name="rate" value="30">
30
</label>
<label >
<input type="radio" name="rate" value="40">
40
</label>
<label >
<input type="radio" name="rate" value="50">
50
</label>
<label >
<input type="radio" name="rate" value="60">
60
</label>
<label >
<input type="radio" name="rate" value="70">
70
</label>
<label >
<input type="radio" name="rate" value="80">
80
</label>
<label >
<input type="radio" name="rate" value="90">
90
</label>
<label >
<input type="radio" name="rate" value="100">
100
</label>
</div>
</div>
<div class="col-sm-12">
<button type="submit" class="btn btn-primary" name="Submit">Submit</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
<?php
include("include/nurse-footer.php");
if(isset($_POST['Submit']))
{
if(isset($_POST["usrtyp"]) && isset($_POST["uname"]) && isset($_POST["feedback"]) && isset($_POST["rate"]))
{
$Rate = $_POST["rate"];
$User = $_POST["usrtyp"];
$Name = $_POST["uname"];
$Feedback = $_POST["feedback"];
$sql= "INSERT INTO `hospital`.`feedback` (`name`, `feedbacks`, `user`, `rate`) VALUES ('$Name', '$Feedback', '$User', '$Rate')";
$insert = mysqli_query($conn,$sql);
if($insert)
{
echo"<script>window.alert('Successfully');</script>";
}else echo"<script>window.alert('Please Retry');</script>";
}else echo"<script>window.alert('Please Fill Information Properly');</script>";
}
?>