Example of using php to verify the validity of the check box. Verify the php code of the check box, as follows :? Php *** verify the validity of the check box in php ** $ valueyes; php code of the echoinputtypecheckboxnamesubscribev verification check box is as follows:
The code is as follows:
/**
* Verify the validity of the check box in php
*/
$ Value = 'yes ';
Echo"Verify data ";
If (isset ($ _ POST ['subscribe']) {
If ($ _ POST ['subscribe'] = $ value ){
$ Subscribed = true;
} Else {
$ Subscribed = false;
The value of the print 'submitted check box is invalid. ';
}
} Else {
$ Subscribed = false;
}
If ($ subscribed ){
Print 'verification valid! ';
} Else {
Print 'verification is invalid! ';
}
The pipeline code is as follows :? Php/*** verify the validity of the check box in php */$ value = 'yes'; echo "input type = 'checkbox' name = 'subscribe' v...