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