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.
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?
Thank you in advance
<strong>Installed:</strong> <input type="text" name="Installed" value="<?php echo $Installed; ?>" />
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; ?>" />
Thank you in advance
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The first line of Marks code should be:
As for a radio, you'd use something like this:
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.
<select id=manager" name="manager" onchange="update_manager()">
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>
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!
https://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_5450-Common-Sense-Examples-Using-Checkboxes-with-HTML-JavaScript-and-PHP.html