<?php include('../include/functions.php');
header("Content-Type: text/plain; charset=iso-8859-1");

$table = escape($_REQUEST['table']);
$field = escape($_REQUEST['field']);
$searchquery = escape($_REQUEST['q']);
$limit = $_REQUEST['limit'];
$type = escape($_REQUEST['type']);
$searchquery = utf8_decode($searchquery);
$autocomplete = new autocomplete($searchquery, $table, $field, $limit, $type);
print $autocomplete->getresult();
