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
Post a Comment