Bootstrap FreeKB - PHP - Autocomplete user input
PHP - Autocomplete user input

Updated:   |  PHP articles

This Web page has an excellent tutorial on how to autocomplete an input form as a user types using PHP, MySQL and JavaScript.  http://www.bewebdeveloper.com/tutorial-about-autocomplete-using-php-mysql-and-jquery.  Near the top of this Web page is a Download source code button. This will download a zipped folder to your Downloads folder.  Extract the zipped folder.  The extracted folder will contain a few subfolders.  There is no need to transfer the files in the CSS or images folder to your /web/server/root. You will need to transfer the 2 files in the js folder to your /web/server/root/js/ folder.

There is a file ajax_refresh.php. Transfer this file to your /web/server/root/. You will also need to end the markup of this file, adding your MySQL password.

There is an index.php file. You probably already have an index.php file in your /web/server/root/.  Rename this file to stage.php, and then transfer this file to your /web/server/root/.

Lastly, there is a file autocomplet.sql. Use this file to create the testing MySQL database, table, columns and data.  You can then load the stage.php page in your Web browser, and the base functionality of the autocomplete engine should work.

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 7cb3e4 in the box below so that we can be sure you are a human.