Polite select component on html page with data coming from table

-2

I have a php variable that has its value.

ex: "AREA 05"

This is displayed in the input. I have a table that is related to the logins according to these areas. How do I and if it is possible to use this php variable to popular the html select tag with its respective logins, ie the select is populated according to its area. Is it possible?

    
asked by anonymous 11.10.2018 / 15:26

2 answers

1

I do not understand your question very well, but if you want to do something dynamic, asynchronous, that when the person selects the item in the select, you can do a new search in the bank and popular the table, you can use AJAX with PHP takes a look at the example at W3SCHOOL if that is what you are looking for.

    
11.10.2018 / 15:33
0

Yes it is possible, you will have to deal with AJAX, when the input field is filled with 'AREA 05' , An AJAX query will be made at the bank with the reference in 'logins' , the results will be brought and displayed in the 'select' listing.

If you want, you can use this example to build.

    
11.10.2018 / 20:07