To obtain the values of multiple check boxes in PHP, do you need to add [] to the name attribute value of the check box? I found that the value of the check box is obtained in the PHP program, generally, [] is added to the name attribute of the check box, for example, & lt; html & gt; & lt; body & gt; & lt; h1 & nbsp; align = "center" & gt; when a new user obtains the values of multiple check boxes in PHP, must the name attribute value of the check box be added []?
I found that in PHP programs, to obtain the value of the check box, we usually add [] to the name attribute of the check box, for example:
New user registration
I can't help but use other methods to replace it, because I want to convert ASP Programs to PHP programs. I hope it is best not to change HTML files.
Also, that is to say, with this Hoby [] added, the obtained result will be an array. if it is not added, it is not. this is also different from ASP, ASP always obtains an array for elements with the same attribute values. Share To: new user registration
------ Solution --------------------
This cannot be changed.
------ Solution --------------------
If you want to get the array of multiple selection boxes without changing the HTML structure, you can use JS to get the value of multiple selection boxes and synthesize the JS array, and then pass the value to PHP.
------ Solution --------------------
This is a php convention. it cannot be changed unless the kernel is modified.
However, you can also process the submitted data on your own.
For forms
Submit and use
Echo urldecode (file_get_contents ('php: // input '));
You will get a string like this: name = & Sex = 1 & holobby = Music & holobby = travel
As for what to do next? That's your own thing.