Tools, FAQ, Tutorials:
Specifying Input Values for Radio Buttons in PHP
How To Specify Input Values for Radio Buttons in PHP?
✍: FYIcenter.com
Radio buttons can be used in a form for two situations:
The sample PHP script page below is a modified version of submit_comments.php that has one group of exclusive radio buttons named as "job" and single switch named as "rate":
<?php print("<html><form action=processing_forms.php method=post>"); print("<table><tr><td colspan=2>Please enter and submit your" ." comments about FYICenter.com:</td></tr>"); print("<tr><td>Your Name:</td>" ."<td><input type=text name=name></td></tr>\n"); print("<tr><td>Your Job Title:</td>" ."<td><input type=radio name=job value=dev>Developer " ."<input type=radio name=job value=sqa>QA Engineer " ."<input type=radio name=job value=dba>DBA " ."<input type=radio name=job value=other>Other " ."</td></tr>\n"); print("<tr><td>Like Site:</td>" ."<td><input type=radio name=rate></td></tr>\n"); print("<tr><td>Comments:</td>" ."<td><input type=text name=comment></td></tr>\n"); print("<tr><td colspan=2><input type=submit><td></tr></table>\n"); print("</form></html>\n"); ?>
If you submit the form with this page, you will get something like this:
Number of values: 4 name = Sue job = sqa rate = on comment = Will visit FYICenter.com again.
⇒ Specifying Input Values for Checkboxes in PHP
2016-11-13, 1439🔥, 0💬
Popular Posts:
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...
What is EPUB 3.0 Metadata "dc:publisher" and "dc:rights" elements? EPUB 3.0 Metadata "dc:publisher" ...
How to use "xsl-transform" Azure API Policy Statement? The "xsl-transform" Policy Statement allows y...
How to convert JSON Objects to PHP Associative Arrays using the json_decode() function? Actually, JS...