My input field should receive autocomplete values from a readbean php datasource
Table that I want to get is "user" and the attribute is "name"
I dont now how to do this at all I tried this but it does not work Error Parse error: parse error in
$( "#enterUser" ).autocomplete({
source:<?php$users = R::findAll('users');
foreach ($users as $user) {
echo '<option value="'. $user->name .'" ';
if($_POST['filterUser'] == $user->name){
echo "selected";
}
echo '>' . $user->name . '</option>';
}
?>
});
Can somebody please explain how to attach my user Table to be the source of the autocomplete ?