-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathfeedback.php
63 lines (51 loc) · 1.88 KB
/
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
<?php
require('db.php');
session_start();
if(!isset($_SESSION["username"])){
header("Location: start.php");
exit(); }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="feedbackstyle.css">
<title>DIARY DISPLAY</title>
</head>
<body>
<div class="box1">
<img src="feedback.jpg" class = "image">
</div>
<div class="box3">
<p>Please fill the </p><br>
FEEDBACK FORM<br><br>
<p>Thank you!</p>
</div>
<div class="box2">
<form action = "" name = "Form" method ="post" required>
<div class="name">NAME</div><br><br>
<input type = "text " name = "username" class = "USER1" placeholder = "XYZ" required><br><br>
<div class="name">AGE</div><br><br>
<input type = "text" name = "age" class = "USER1" required><br><br><br>
<div class="name">FEEDBACK</div><br><br>
<textarea name="Remarks" placeholder="Remarks"></textarea><br><br>
<button type = "submit" name = "submit" onClick="window.location='start.php';">Submit</button>
<br><br>
<?php
if (isset($_POST['submit']))
{
$name = $_POST['username'];
$age = $_POST['age'];
$remark = $_POST['Remarks'];
$name = mysqli_real_escape_string($conn,$name);
$age = mysqli_real_escape_string($conn,$age);
$remark = mysqli_real_escape_string($conn,$remark);
$query1 = "INSERT INTO `feedback` (`name`,`age`,`remark`) VALUES('$name', '$age','$remark');" ;
mysqli_query($conn,$query1);
}
?>
</form>
</div>
</body>
</html>