How does PHP implement click the Add button to add a single line of items and insert all of the content into the database

Source: Internet
Author: User

How does PHP implement click the Add button to add a single line of items and insert all of the content into the database

On Baidu to see this question, think about the answer, the effect such as:


Html+jquery:


exe.php

<?php $arr _time=$_post[' data ' [' time '], $arr _grade=$_post[' data ' [' Grade ']; $arr _type=$_post[' data ' [' type ']; for ($i =0; $i <count ($arr _time); $i + +) {    $insert [$i] [' Time ']= $arr _time[$i];    $insert [$i] [' Grade ']= $arr _grade[$i];    $insert [$i] [' type ']= $arr _type[$i];} echo "<pre>";p Rint_r ($insert); echo "</pre>";/* Each data is a data array (    [0]            = = Array ([TIME] = > November 7, 2014 15:50:18            [Grade] = 1            [Type] = again honoured        )     [1] = = Array        (            [TIME] = November 7, 2014 15:50:24            [grade] + 2            [Type] = excellent student        )     [2] = = Array        (            [TIME] = November 7, 2014 15:50:27            [Grade] = 1            [Type] = again honoured        )) */?>
you should know what to do when you see the results.


How does PHP implement click the Add button to add a single line of items and insert all of the content into the database

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.