Home>
<form>
Are you a student?<br>
<input type = "radio" name = "student" value = "I am a student">Yes
<input type = "radio" name = "student" value = "not a student">No
<br>
<input type = "submit">
</form>
What if an if statement wants to check if value = "not a student" is checked? .
You can also get the value of the second name attribute. . .
-
Answer # 1
-
Answer # 2
* Or instead of picking out what is checked
If you just want to pick up the second value
Related articles
- php - check box is it possible to determine whether or not there is a check and branch?
- how to give class attribute to php
- what do you recommend for php reference books? this is the second book
- php - [wordpress] acquisition of whether there is a comment field (status?)
- is there a specification when "i don't know whether or not the "negation part" itself exists" in the negativ
- php - about value attribute of form
- whether to put the sql statement directly or as a variable in the argument of prepare when issuing the sql statement of php
- php - i am doing the second edition of laravel and want to modify the environment variables in the env file, but the env file ca
- php - mysql: whether to use different instance for each user
- php - when input type of html form is datetime-local, initial value specified in value attribute is not displayed at the beginni
- php - show/hide under check conditions does not work in acf of wordpress
- [php] can you give me some advice on whether the created form is vulnerable?
- php - i want to check the array and put its value in the database if there are no duplicates
- php - the attribute indicating the parent-child relationship does not appear on the edit screen of the custom post
- [javascript] [php? ] i want to add a disabled attribute to the input tag created by php after clicking
- i want to check the form input with php, display an error on the same page if it is not filled in, and move to another page only
- php i want to judge whether a character string with a specific pattern exists and store it in a variable if it exists
- php - is it possible to put a variable in the form with the value attribute? 【i added】
- html/php:i want to create a check box that changes the display content on the transition destination page
- php - i want to conditional branch depending on whether any value is included in the value received from the database
Trends
JavaScript (jQuery)
Sample