-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfeedbackAction.php
More file actions
29 lines (24 loc) · 991 Bytes
/
feedbackAction.php
File metadata and controls
29 lines (24 loc) · 991 Bytes
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
<?php
//echo "hello there";
//echo $_POST["subject"];
session_start();
$subject = $_POST["subject"];
$content = $_POST["content"];
$rank = $_POST["rank"];
$todaysDate = new DateTime('now', new DateTimeZone('Asia/Singapore'));
$dateEntered = $todaysDate->format('Y-m-d\TH:i:s');
include("mysql_conn.php");
$qry = "INSERT INTO feedback (ShopperID, Subject, Content, Rank, DateTimeCreated) VALUES (?, ?, ?, ?, ?)";
$stmt = $conn->prepare($qry);
$stmt->bind_param("issss", $_SESSION['ShopperID'], $subject, $content, $rank, $dateEntered);
$stmt->execute();
$result = $stmt->get_result();
$stmt->close();
$conn->close();
$MainContent = "<div class='form-group row'>";
$MainContent .= "<div class='col-sm-9 offset-sm-3'>";
$MainContent = "<h3 style='text-align:center; color:blue'>Thank you for your feedback!</h3>";
$MainContent .= "</div>";
$MainContent .= "</div>";
include("MasterTemplate.php")
?>