Ec (2); because of the special nature of the checkbox, we need to obtain its value, which is different in many languages. In the php tutorial, we use arrays to process it, and a large number of instances are shown below by traversing its values. & Lt; html & gt; & lt; head & gt; & lt; title & gt; checkboxdemo & lt; title & gt; & lt; head & gt; & lt; body & gt; & lt; h1 & gt; checkbox script ec (2); script
Because of the special nature of the checkbox, we need to obtain its value, which is different in many languages. In the php tutorial, we process it in the form of an array and traverse its value, there are a large number of instances below.
Checkbox demo
Checkbox demo
Demonstrates checkboxes
Instance
Using default checkbox values
$ Food = $ _ get [food];
$ Self = htmlentities ($ _ server ['php _ self ']);
If (! Empty ($ food )){
Echo "the foods selected are:
";
Foreach ($ food as $ foodstuf)
{
Echo" ". Htmlentities ($ foodstuf )."
";
}
}
Else
{
Echo ("');
}
?>