I have a website where you can get information about some content in the database using some parameters you can set before.
By now the page loads the SQL Statement (to populate the dropdown menu for selection) from a file, executes it and adds HTML code as shown below:
while($rec = $connection->FetchRow($result))
{
$selected = (in_array($rec[0], $arr) OR $bSelFirst == TRUE) ? 'selected="selected"' : '';
$sResult = htmlentities($rec[0], ENT_QUOTES, "iso8859-1" );
$sMatchcode = htmlentities($rec[1], ENT_QUOTES, "iso8859-1" );
$tmprslt .= ' <option value="'.$sResult.'" '.$selected.'> '.$sResult.';'.$sMatchcode.'</option>';
$bSelFirst = false;
}
The problem with this code is, on large results the page takes ages to build and the dropdown menu is almost unusable because it's so slow, sometimes the tab even crashes.
My question now is, how would I load in these information dynamically? Like, you type something into the input field and it only loads or displays relevant answers (e.g. I type "Ap" then it shows me all results that contain "Ap" (case sensitive)).
availableTagsyou see on the example... =)