The form check box is the checkbox
1, the Application of checkbox
<input type= "checkbox" Name= "ch" value= "2" >
2. Because I am transferring an array that is generated in the PHP loop, value is also set to a variable:
<?php
For ($i =0 $i <10; $i + +) {
?>
<input type= "checkbox" Name= "ch[]" value= "<?= $i;? > ">
<input type= "text" name= "t1[<?= $i;? ] "value=" content to be transferred >
<input type= "text" name= "t2[<?= $i;? ] "value=" content to be transferred >
:
:
3, accept also use an array:
<?php
$ch =$_post[' ch '];
$t 1=$_post[' T1 '];
$t 2=$_post[' T2 '];
foreach ($ch as $a)
{
$p _t1= $t 1[$a];
$p _t2= $t 2[$a];
}
?>
Here's another tip: the settings you need to upload a large volume file in PHP
Needless to say, you have to find the PHP configuration file php.ini trouble:
Open PHP.ini, first find
;;;;;;;;;;;;;;;;
; File uploads;
;;;;;;;;;;;;;;;;
Area, there are several parameters that affect file uploads:
File_uploads = on; whether to allow the switch to upload files over HTTP. The default is on, which is open
Upload_tmp_dir files are uploaded to the server where temporary files are stored, and the system default temporary folder is used if unspecified
Upload_max_filesize = 8m business, that is, the maximum size of the upload file allowed. The default is 2M
In
;;;;;;;;;;;;;;;;;
; Data handling;
;;;;;;;;;;;;;;;;;
Area, there is one more:
Post_max_size = 8m refers to the maximum value that can be received by the form Post to PHP, including all the values in the form. The default is 8M
Generally, set the above four parameters, upload <=8m file is not a problem, in the normal network situation.
However, if you want to upload >8m files, only set up the above four will be able to do. Unless your network really has 100m/s upload high-speed, otherwise you have to care about the following parameters:
;;;;;;;;;;;;;;;;;;;
; Resource Limits;
;;;;;;;;;;;;;;;;;;;
Max_execution_time = 600, maximum time for each PHP page to run (seconds), default 30 seconds
Max_input_time = 600: The maximum time required for each PHP page to receive data, default 60 seconds
Memory_limit = 8m, maximum memory consumed by each PHP page, default 8M
After the above parameters are modified, the network allows the normal situation, you can upload large volume files.
Well, set it up and try it now. Click on the 1200 large m file upload