katlees
asked on
Show New fields if one radio button option is selected
I have a very simple form that writes to a database. It asks -do you rent or own?
if they rent, I need to ask for Landlord Information
I don't want to show the fields of the form unless they say they rent and I still need it to save to the database...
if they rent, I need to ask for Landlord Information
I don't want to show the fields of the form unless they say they rent and I still need it to save to the database...
<table><tr> <td>Do you? </td>
<td>
<?PHP echo"<input type=\"radio\" name=\"Res1Rent\" value=\"Rent\" checked=true> Rent
<input type=\"radio\" name=\"Res1Rent\" value=\"Own\"> Own\n";?>
</td>
</tr>
THESE FIELDS WON"T SHOW UNLESS RENT OPTION IS SELECTED ABOVE
<tr><td colspan="4">Please list Landlords Information</td></tr><tr><td>Name:</td><td><?PHP echo "<input type=\"text\" name=\"Landlord1\" value=\"$Landlord1\">\n";?></td><td>Address</td><td><?PHP echo "<input type=\"text\" name=\"LL1Address\" value=\"$LL1Address\" />\n";?></td></tr><tr><td>Phone</td><td><?PHP echo "<input type=\"text\" name=\"LL1Phone\" value=\"$LL1Phone\"/>\n";?></td><td></td></tr></table>
Not a Java question is it?
ASKER
Sorry, didn't see that I hit that... No, it isn't.
Does this have anything to do with Java Progarmming Language?
I think this is about PHP and JavaScript.
I think this is about PHP and JavaScript.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
PERFECT! Thank you