Summary: research on the form checkbox to transmit data to PHP

Source: Internet
Author: User
Tags form post
The form check box is the use of checkbox1 and checkbox inputtype = "checkbox" name = "ch" value = "2" 2. because I transmit the array generated in the php loop, therefore, the value must be set to a variable :? Phpfor ($ I = 0; $ i10; $ I ++ ){? Inputtype = "checkbox" n

The form check box is checkbox.

1. Use of checkbox

2. because I transmit the array generated in the php loop, the value must be set to a variable:

For ($ I = 0; $ I <10; $ I ){
?>



:
:

3. array is also used for receiving:

$ Ch = $ _ POST ['ch'];
$ T1 = $ _ POST ['T1'];
$ T2 = $ _ POST ['T2'];

Foreach ($ ch as $)
{
$ P_t1 = $ t1 [$ a];
$ P_t2 = $ t2 [$ a];
}
?>

  I would like to sum up the following tips: the settings required when uploading large files in PHP

Needless to say, you have to find the PHP configuration file php. ini :)

Open php. ini, first find
;;;;;;;;;;;;;;;;
; File Uploads;
;;;;;;;;;;;;;;;;
Region, which has the following parameters that affect file upload:

File_uploads = on; indicates whether to enable the upload of files over HTTP. ON is enabled by default.

Upload_tmp_dir; upload the file to the server to store the temporary file. if it is not specified, the default temporary folder will be used.

Upload_max_filesize = 8 m; indicates the maximum file size that is allowed to be uploaded. The default value is 2 MB.

In
;;;;;;;;;;;;;;;;;
; Data Handling;
;;;;;;;;;;;;;;;;;
Region:

Post_max_size = 8 m; it refers to the maximum value received by the form POST to PHP, including all values in the form. The default value is 8 MB.

Generally, after the preceding four parameters are set, the file to be uploaded <= 8 m is not a title, and the network is normal.

However, if you want to upload a large file larger than 8 MB, you can only set the above four items. Unless your network has a high upload speed of 100 Mbit/S, you have to pay attention to the following parameters:

;;;;;;;;;;;;;;;;;;;
; Resource Limits;
;;;;;;;;;;;;;;;;;;;

Max_execution_time = 600; maximum time (in seconds) for running each PHP page. the default value is 30 seconds.

Max_input_time = 600; maximum time required for receiving data on each PHP page. the default value is 60 seconds.

Memory_limit = 8 m; maximum memory consumed by each PHP page. the default value is 8 M.


After modifying the preceding parameters, you can upload a large volume of files under the normal conditions agreed by the network.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.