Link to home
Start Free TrialLog in
Avatar of zer0zer0
zer0zer0

asked on

Very simple PHP/HTML question for a Yes/No radio button and list.

How would I make this be a simple Installed/Not Installed radio button?  I have everything working right now with submitting from a text box but I don't want to give them the option of filling out a text box for this part.

<strong>Installed:</strong> <input type="text" name="Installed" value="<?php echo $Installed; ?>" />

Open in new window



Lastly, how would I make this a list of names instead of having them type in their names.  For example the managers would be Bob, Joe, and Jason.  How can I make this a list instead?

<strong>Manager:</strong> <input type="text" name="fmanager" value="<?php echo $fmanager; ?>" />

Open in new window



Thank you in advance
ASKER CERTIFIED SOLUTION
Avatar of Mark Brady
Mark Brady
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The first line of Marks code should be:

<select id=manager" name="manager" onchange="update_manager()">

Open in new window


As for a radio, you'd use something like this:

Installed<br>
<input type="radio" name="installed" value="yes" id="installedYes" checked> <label for="installedYes">Yes</label><br>
<input type="radio" name="installed" value="no" id="installedNo"> <label for="installedNo">No</label><br>

Open in new window


The label allows you to click on the Yes/No test to select the option and the check attribute means that value is checked by default.
Thanks Chris - My bad!