Webpage for Games
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

18 lines
484 B

<?php
$response_array = array();
include_once $_SERVER['DOCUMENT_ROOT'] . '/php/mysql_connect.php';
$conn = new MySQLConnection();
$content = $_POST['content'];
$projectName = $_POST['projectName'];
$sql = "INSERT INTO feedbacks (content, project_name)
VALUES (?, ?)";
$stmt = $conn->prepare($sql);
$result = $stmt->execute([$content, $projectName]);
$response_array['result'] = json_encode($result);
header('Content-type: application/json');
echo json_encode($response_array);