Discussion on Multi Category/Feature AutoComplete Intelligent AJAX Search


muwakaba supports this item


This author's response time can be up to 1 business day.

18 comments found.

Has it got abilty to assign different list id’s to determine what database or table it performs the query?

For example, Similar approach to Algolia, I would be interested in purchasing an extended license if you can implement this so when you install the code / api on different pages within your site you can perform search querys relating to different tables or even databases and reference the tables using a unique id or list id.

Hi BirdyUK, thank you very much for your comment. Yes it is possible, it can be done in two ways. As you see in the demo page, the build function for the Autocompleter has many customization parameters, one of them is: server_file, so when you create list #1 on page A, then you can point it to server_file1 which includes the PHP class in file A that has a particular database and tables & when you build list #2, you point it to server_file2 which includes the PHP class in file B that has different database and tables, and so on.

The second way is to include all the categories (tables) in one PHP class and choose which category(table) each list will view via using the headers and num_rows_per_category parameters in the build function. For example, in list #1, I want to show only People (3 results in the list), Pages (2 results in the list) & Actors (4 results in the list), the headers array for all tables will be: ["People", "Groups", "Pages", "Websites", "Products", "Actors"], and the num_rows_per_category: [3,0,2,0,0,4] – the ZERO means that results from the corresponding table will not be shown in the list. For list #2, same way, for example, I can show only 5 results of groups by having the num_rows_per_category = [0,5,0,0,0,0] and so on.

Kindly let’s know if this answered your question and please feel free to contact us should you require further clarifications. Thanks.

pre-sale question: can this be used on my wordpress site? thanks.

Hi gr8, thank you very much for your comment. As both the Autocompleter and the WordPress are using the PHP, then it is possible but manually; you need to edit the database queries to point them to the article tables and to place the Autocompleter files into the correct directories. We are thinking about making a WordPress Autocompleter if we see people are interested in that :)

hi there.. I’m looking for a search function that can be implemented within the current look (CSS) of my site will this work? Also, can this search everything like text? For example if I have a page with “web design” written in it, will this search find that page?

Hi Losse-omis, thanks for your comment. Yes it works. Also, you can adjust any SQL query within this product and customize it as you wish. You can test this Autocompleter here: http://www.muwakaba.com/plugins/autocomplete please let’s know should you have further questions :)

I’m looking for a simple search box though… do I need to have all that code underneath? Can the user simply enter text in the search box and either hit “search” button or click a link that auto suggests with the search term?

The code is very clean and has very light size. Regarding your question, yes, the user can hit the “search” button to go to the page for all suggestions or can hit the row that show the exact match. Also, the user can hit “Show More Results…” URL below if he/she wants to see more results. Everything can be done with only 1 line of JavaScript, you will not need to write any code.

Using “MATCH” or “LIKE” SQL?

Hi Theodisbutler, thanks for your question, we have provided a sample database (few records) and the search query runs the LIKE because we wanted to show the full functionality of this Autocompeter. It’s super easy to to use the full text index query (MATCH) but it’s better to do that when you have huge number of records as it mightn’t give accurate results when you have few records. Also, you can customize your queries as you wish according to your tables and the data, the code is very clean and easy to customize :)

Not work for php 7…

Notice: Undefined index: ac in C:\xampp\htdocs\cerca2\mkac-ajax\autocomplete.php on line 101

Hello Giogiosw, thank you very much for your purchase and comment. Please comment mysql_escape_string as it’s depreciated in PHP 7. You can use Mysqli instead: http://php.net/manual/en/function.mysqli-escape-string.php. Also, please check your localhost server settings. Thanks.

The autocomplete script you sent me has missing build.js file

Hi Elvincky, thanks for your purchase. The files you downloaded contain the build.js, we haven’t sent you anything as you can get everything automatically when you download the files. We have just downloaded the files to check out and we found the build.js file is available with all the files. Kindly download the files again. Thanks.

If someone wanted to purchase full access to this code, is that a possibility?

Hi Jsaintvi, thanks for your purchase and your comment. Do you mean to resell it?

no, as in to be able to use in my e-commerce web app freely

Thanks for your answer. Kindly communicate with the Envato support team about this issue and they will advise you.

Hi, do you offer buy out of the script?

You want to take the full rights and resell it as you are the new owner?

I want to take the full rights, but not interested in selling it. I also would like you to remove the customization, where styling(appearance) are the same for everything. That would reduce the code size as well. How much would that be?

Thanks for clarifying & your offer. We are sorry, we can’t proceed with this deal as the plugin has been developed from scratch (using our own libraries), we spent years to develop our dependence’s and reach this quality.

Very Interested in this product. But a huge site could lead to a lengthy results list. Is it possible to tabulate the results at the top of the list? That way a visitor who is only wanting to search for people can select people at the top, or pages and not need to scroll through a lengthy list to see the results for their area of concern.

Thanks for your interest. The answer is yes, you can add in each tab an autocompleter to fetch a certain category. As you know, the autocompleter can be created easily from the JavaScript and you can customize it to show one or more categories. In your case, you customize each autocompleter to show a single category in each tab.

Ok, is that an option in the configuration or would that be a custom code thing? Many things are possible, few are included typically :)

For the tabs, you need to make the CSS yourself but for the Autocompleter you can customize it easily from the initialization function by adjusting the values of the JSON parameters. For example, in the first tab, you adjust the autocompleter like this: muwakaba_autocomplete({headers: ["People","","","", ""],...}); so it will show only people.

The second tab you adjust it like this: muwakaba_autocomplete({headers: ["","Groups","","", ""],...});, it will show only groups.
Kindly let us know should you need further clarifications.

Thank you!

Hello. I need to remove the database element of the script and have the results predefined in a text file or something similar. How can I make this happen with your script?

Hello Stckhlm72,

Thanks for your purchase.

Actually this script is integrated with the MySQL database because the MySQL supports the search queries that are required as a main function in this script. Using a plain text file (eliminating the database) will not support the search queries to fetch the records according to the search term. The script supports HTML5 caching, for example, when you search for “stckhlm” for the first time, it will fetch the result from the database, the second time, it will be fetched from the browser cache. When you close the browser, the cache will be erased.

Kindly let’s know should you need more details :)

Thank you!


I’m getting an error message: Syntax Error: Unexpected token.


Thanks for your purchase! Did you make sure that the database connection credentials are correct? One more thing, please use the files that match your current PHP version. You can email us for more details, we would be happy to assist :)




thank you for your prompt response. It was the password of the db connection. I must used the wrong password. :)

What is your email address? I can’t seem to find it on your site. I need some custom work done. Thanks


You are quite welcome and we are glad to know that you got it working :) You can email us through the form on CodeCanyon here: https://codecanyon.net/user/muwakaba, the message will reach out our inbox and we will reply you back to your email.

We would greatly appreciate your feedback on this script :)

Very best!


Since, I’m using this with my current website, the database connection is of course already there. I need to operate off of the current connect, and search my current database, not just the predefined database tables you created. i.e., search my own members and their photos, not the ones in the package.

But the first step is knowing where to replace the call(s) to the database config file, so I can change it’s location.

I’ve looked through the index.js, build.js and it is fairly easy to understand. However, the library is a bit more complex. Are there anyu changes needed in that file to personalize it to my own site and database?

Third, what file is called from the form action? And last, when a keyword (person, forum post, etc) have their own url, ie forums.php?thread=1234 or profile.php?id=4567

how should the view_url be structured?

Yes, the folders for this script have a prefix “mkac-” to make it easier for you to integrate the script within your current files. You just need little tweaks.

sure you are joking. You want me to restructure my website to be able to get your search function to work? Why not just have a configuration setting that can locate the path?

You just need to add the script folders to your website folder, it’s not a restructure process. It’s an AJAX based script, in the build.js you can change any parameter value of your choice because every user for this script has different values to assign. Kindly refer to the documentation.

I am trying to implement this on my site which has existing databases. How exactly do I implement this on the site. I am having trouble determining how and where to include my database connection, modify the query, customize the functions, and call the function. Your help would be greatly appreciated. If easier, I can send you code examples via email so you can identify any problems.


Thanks for your purchase. In the folder mkac-classes, you can find the database file to connect to your current database, and you can find the autocomplete.php file which includes the database queries, you can change the table names and the table columns to query from your tables/columns. In the JS folder mkac-js, you have the file build.js which initializes this autocomplete list, make sure that you add correct parameters values.




MJP Purchased

How can I convert HTML entities to characters? For instance trying to use > and the browser returns “& g t ;” which i don’t want. Thanks!


You can touch a base with us through our profile on CodeCanyon: https://codecanyon.net/user/muwakaba to check the error you get, we will respond to your email ASAP to provide us with a screen shot.



MJP Purchased

ok, thank you, my friend. i am on MAMP but will try another server and see how it goes.

Thanks, please try the XAMPP, it’s very quick & easy server. Here is the link to download: https://sourceforge.net/projects/xampp/ , all the best!


MJP Purchased

Hello again! Can you tell me what is suppose to happen when user clicks on ‘Let’s see more results for…” i could really use this feature but not clear how to set it up to go to a page with more results. Your preview goes to ‘server not found’. Thank you!


It’s made to re-direct the visitor to the page that contains all search results or any external page with the “keyword” parameter as variable in the link. You just need to go to the functions outputRowClick & outputSearchIconClick in build.js file, and change the website URL inside the window.open(http://www.your_website.com/....) method.

Please let’s know should you require further clarifications :)


Hello I purchased this product yesterday but doesn´t work. I have installed the following coreectly: - mysql -I use php7 so I deleted the other 2 files in mkac-classes. -in mkac-ajax I changed to include ’../mkac-classes/class.autocomplete – php7.php’;

NOTHING WORK: here is the link: http://www.gurunorway.no/

Hello, actually the code works like a charm and the effort put in this plugin was huge, the quality is too high spent years to produce it but obviously you have a simple bug that’s why we asked you to access to resolve it. One more thing, we responded so quickly to you, as you see in our profile, we defined our response time is within 24 hours but we responded to you faster than this. Also, you should be aware of time difference, the time you’re awake in your country, can be our sleeping time, so please consider this. Thank you.

Hello, actually the code works like a charm and the effort put in this plugin was huge, the quality is too high spent years to produce it but obviously you have a simple bug that’s why we asked you to access to resolve it. One more thing, we responded so quickly to you, as you see in our profile, we defined our response time is within 24 hours but we responded to you faster than this. Also, you should be aware of time difference, the time you’re awake in your country, can be our sleeping time, so please consider this. Thank you.

Hello, thanks for providing us with your FTP login, the problem has been resolved in 10 seconds only :) We discovered that you forgot to remove the ” – php7” in the name of the ajax file for php7, as we mentioned in the first comment it should be without ” – php7”. Thanks for contacting us and you’re welcome always :)

purchased code :ded89a66-4161-4b47-aa9a-3fba1adf63f5