Page 1 of 1

Form with php

Posted: Thu Aug 24, 2006 12:20 pm
by Max Current
Hi guys,

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?

Thanks,

Max

Posted: Thu Aug 24, 2006 12:23 pm
by Burrito
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).

Posted: Thu Aug 24, 2006 12:24 pm
by feyd
That isn't really done by php per se. Javascript, yes.

edit: Damn, Burrito and my response sound similar. :)