<?php
	$comment = $_GET["comment"];
	$name = $_GET["name"];
	$local = $_GET["local"];
	$age = $_GET["age"];
	$q = $_GET["q"];


	$conn = new mysqli("94.46.181.151", "rodrigon_omsl", "aJ7jt48IFTBa", "rodrigon_omsl");

	// Check connection
	if ($conn->connect_error) {
	  die("Connection failed: " . $conn->connect_error);
	}

	$sql = "INSERT INTO opinions (opinion, name, city, age, question_id, inserted) VALUES('{$comment}', '{$name}', '{$local}', '{$age}', '{$q}', '0')";
	$result = mysqli_query($conn, $sql);
	
	echo $result;

	mysqli_close($conn);


	
?>