The check box can be used to select multiple items. when entering some forms, the browser sometimes needs to select multiple items (such as interests and hobbies). the check box usually exists at the same time, to facilitate value transfer, the name can be defined as an array: inputtype... the check box can be used to select multiple items. when entering some forms, the viewer sometimes needs to select multiple items (such as interests and hobbies)
Check boxes usually exist at the same time. to facilitate value transfer, the name can be defined as an array:
On the return page, you can use the count () function to calculate the size of the array and use the for loop statement to output the value of the selected check box:
Obtains the text box, password field, hidden field, button, and text field values.
The methods for getting the values of the text box, password domain, hidden domain, button, and text domain are the same. the name attribute is used to obtain the desired value, therefore, do not repeat the name value to avoid obtaining the wrong value.
The following example shows how to use $ _ post [] to obtain the values of the text box, password field, hidden field, button, and text field:
Password :". $ _ post [pw]; // enter the submitted data} // Display result: // the password you entered is zero // The password is 123456 // user name: // password:
Obtain the value of the single button
Radio single-choice buttons are generally grouped and have the same name value and different value values. only one value can be selected at a time in a single-choice button.
The following describes how to obtain the value of a single shard through a specific instance. the instance code is as follows:
Tutorial link:
Reprint at will ~ However, please keep the tutorial address★