PHP Developers Network
http://forums.devnetwork.net/

How to autopopulate
http://forums.devnetwork.net/viewtopic.php?f=6&t=142954
Page 1 of 1

Author:  priyamsharma474 [ Wed Sep 21, 2016 4:03 am ]
Post subject:  How to autopopulate

How can I autopopulate things in dropdown like I want that if I type 'a' every thing starting with 'a' should apppear?

Author:  requinix [ Wed Sep 21, 2016 7:37 am ]
Post subject:  Re: How to autopopulate

If it's a short list of items then HTML 5 has : you put the list into the HTML and let the browser do the rest.

If it's a long list, like if you need to search your database, then the answer is AJAX: do a request when the user types to a PHP script, which includes what the user has typed, it does the database query or whatever to get the results, and they are returned to the Javascript code which displays the results. Using a library or plugin makes all that much easier - all you need to do is write the PHP code.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/