<?php
session_start();
chdir('..');
	require_once('api/Simpla.php');
	$simpla = new Simpla();
if(empty($_SESSION['admin'])) exit('3');

$simpla->db->connect();

foreach($_POST as $k=>$v) $_POST[$k] = mysql_real_escape_string( $v );

$simpla->db->query("UPDATE `__feedback` SET `name`='".$_POST['name']."',`email`='".$_POST['email']."',`text`='".$_POST['text']."' WHERE `id`='".(int)$_POST['id']."' ");

echo (int)$_POST['id'];