I am trying to create a drop-down menu (select input type), and based on which of the options the user selects (Yes or No), an input text box appears for the user to enter their member number. Unless the user selects "Yes" from the menu, this box shouldn't appear.
I have tried two options -- using javascript within my php file (onSelect) and a simple if statement (with no javascript) basically saying if variableyes/no = "yes" echo the input box.
Here is the latter code:
Expand|Select|Wrap|Line Numbers
- <?php
- if ($PDGA_Is =="Yes")
- echo "<input type='text' size='10' name='$PDGA_No' value='$fields['PDGA_No']' />";
- ?>
Thx
DH