-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeedback.php
More file actions
91 lines (83 loc) · 1.68 KB
/
feedback.php
File metadata and controls
91 lines (83 loc) · 1.68 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
<html>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</html>
<?php
session_start();
include "dbconfigure.php";
if(verifyuser())
{
$u = $_SESSION['semail'];
$query = "select * from siteuser where emailid='$u'";
$rs = my_select($query);
if($row=mysqli_fetch_array($rs))
{
$username = $row[0];
$city = $row[2];
$address = $row[3];
$contact = $row[5];
}
}
else
{
header("location:login.php");
}
?>
<style>
.error
{
color: #FF0000;
}
</style>
<html>
<head>
<?php include "header.php"; ?>
<style>
td{color : brown}
</style>
</head>
<body>
<?php include "nav2.php";
echo "<br> Welcome <b style = 'color : green ; text-transform:capitalize'>$username</b>";
?>
<?php
$feedbackErr= "";
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
if (empty($_POST["ymsg"]))
{
$feedbackErr = "Please Write any feedback";
}
else
{
$date = date("d-m-y");
$message = $_POST['ymsg'];
$query1 = "insert into feedback(name,mobileno,emailid,date,ymsg) values('$username','$contact','$u','$date','$message')";
$n = my_iud($query1);
if($n==1)
{
echo '<script>
swal({
text: "Feedback Added!",
icon: "success",
})
</script>';
}
else{
echo '<script>alert("Something Went Wrong , Try Again");</script>';
}
}
}
?>
<div class="container" >
<h1 class="text-center" style = "font-family : Monotype Corsiva ; color : red">Send FeedBack</h1>
<br>
<br>
<form method="post">
<label><b>Feedback Message</b></label><span class="error">* <?php echo $feedbackErr;?></span>
<textarea class="form-control" name="ymsg" rows=10></textarea>
<br>
<input type = submit value="Submit" name="submit" class="btn btn-success">
</form>
</div>
</body>
</html>