the code is from: [url]http://nodstrum.com/2007/09/19/autocompleter/
[code=html]
if(isset($_POST[‘queryString’]))
{
$queryString = $_POST[‘queryString’];
if(strlen($queryString) >0) {
$query = $db->query(“SELECT value FROM countries WHERE value LIKE ‘$queryString%’ LIMIT 10”);
if($query) {
while ($result = $query ->fetch_object()) {
echo ‘<li onclick=”fill(’‘.$result->value.’‘);”>’.$result->value.‘</li>’;
}
}
else {
echo ‘ERROR: There was a problem with the query.’;
}
}
else {
}
} else {
echo ‘There should be no direct access to this script!’;
}
}
?>
i guess i just don’t know how to convert
echo ‘<li onclick=”fill(’‘.$result->value.’‘);”>’.$result->value.‘</li>’;
into php4, without getting some errors along the way. thank you in advance