PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
OK I have a form with a drop down menu. I want, with php to say, when a certain option in the list is selected (but not submitted) then a second input form is shown below it.
I assume I would have to use the else function etc but am unsure of the syntax that I would use to compare what is selected in the menu; without anything being submitted?
you can't really do this with 'PHP' per se. PHP is a server side language and what you're looking to do is client side. You could submit the form to itself on change of the dropdown menu and then build your next option below. Otherwise you'll need Javascript to create your next option (or Ajax).