FreeKB - PHP Autocomplete user input
PHP - Autocomplete user input

This Web page has an excellent tutorial on how to autocomplete an input form as a user types using PHP, MySQL and JavaScript.  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.


Add a Comment

We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.

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


Web design by yours truely - me, myself, and I   |   |