html - How do I use PHP to populate a second select-tag with options based on the option selected in the first select-tag? -


i draw options second select-tag database.

thanks.

you have use ajax perform without page submit.

or submit page make action self (the same php).

check if there $_post[select1value]

then populate db in second select

<select2> <?php if( ($_post['submit'])  && ($_post['select1']) ) { ?>  <option1> of select2</option>  <? } ?> 

thats it.

but ajax nice if wan use


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -