-2
How to save data from a table so that each row follows the column date. Example: Line1 col1 = descricao1 and line1 col2= valor1 and col2linha0= data1 saving > descricao1 + valor1 + data1 How to create an array?
//todos os dados recebidos dos inputs
//recebendo datas de cada coluna
$dats1 = $_POST['dats1'];
$dats2 = $_POST['dats2'];
$dats3 = $_POST['dats3'];
$dats4 = $_POST['dats4'];
$dats5 = $_POST['dats5'];
$dats6 = $_POST['dats6'];
$dats7 = $_POST['dats7'];
$dats8 = $_POST['dats8'];
//Todo esquema para linha 1
$a1 = $_POST['a1'];
$a2 = $_POST['a2'];
$a3 = $_POST['a3'];
$a4 = $_POST['a4'];
$a5 = $_POST['a5'];
$a6 = $_POST['a6'];
$a7 = $_POST['a7'];
$a8 = $_POST['a8'];
$desc1 = $_POST['desc1'];
//Todo esquema para linha 2
$b1 = $_POST['b1'];
$b2 = $_POST['b2'];
$b3 = $_POST['b3'];
$b4 = $_POST['b4'];
$b5 = $_POST['b5'];
$b6 = $_POST['b6'];
$b7 = $_POST['b7'];
$b8 = $_POST['b8'];
$desc2 = $_POST['desc2'];
//Todo esquema para linha 3
$c1 = $_POST['c1'];
$c2 = $_POST['c2'];
$c3 = $_POST['c3'];
$c4 = $_POST['c4'];
$c5 = $_POST['c5'];
$c6 = $_POST['c6'];
$c7 = $_POST['c7'];
$c8 = $_POST['c8'];
$desc3 = $_POST['desc3'];
//Todo esquema para linha 4
$d1 = $_POST['d1'];
$d2 = $_POST['d2'];
$d3 = $_POST['d3'];
$d4 = $_POST['d4'];
$d5 = $_POST['d5'];
$d6 = $_POST['d6'];
$d7 = $_POST['d7'];
$d8 = $_POST['d8'];
$desc4 = $_POST['desc4'];
//Todo esquema para linha 5
$e1 = $_POST['e1'];
$e2 = $_POST['e2'];
$e3 = $_POST['e3'];
$e4 = $_POST['e4'];
$e5 = $_POST['e5'];
$e6 = $_POST['e6'];
$e7 = $_POST['e7'];
$e8 = $_POST['e8'];
$desc5 = $_POST['desc5'];
//Todo esquema para linha 6
$f1 = $_POST['f1'];
$f2 = $_POST['f2'];
$f3 = $_POST['f3'];
$f4 = $_POST['f4'];
$f5 = $_POST['f5'];
$f6 = $_POST['f6'];
$f7 = $_POST['f7'];
$f8 = $_POST['f8'];
$desc6 = $_POST['desc6'];
//Todo esquema para linha 7
$g1 = $_POST['g1'];
$g2 = $_POST['g2'];
$g3 = $_POST['g3'];
$g4 = $_POST['g4'];
$g5 = $_POST['g5'];
$g6 = $_POST['g6'];
$g7 = $_POST['g7'];
$g8 = $_POST['g8'];
$desc7 = $_POST['desc7'];
//Todo esquema para linha 8
$h1 = $_POST['h1'];
$h2 = $_POST['h2'];
$h3 = $_POST['h3'];
$h4 = $_POST['h4'];
$h5 = $_POST['h5'];
$h6 = $_POST['h6'];
$h7 = $_POST['h7'];
$h8 = $_POST['h8'];
$desc8 = $_POST['desc8'];
//Todo esquema para linha 9
$i1 = $_POST['i1'];
$i2 = $_POST['i2'];
$i3 = $_POST['i3'];
$i4 = $_POST['i4'];
$i5 = $_POST['i5'];
$i6 = $_POST['i6'];
$i7 = $_POST['i7'];
$i8 = $_POST['i8'];
$desc9 = $_POST['desc9'];
//Todo esquema para linha 10
$j1 = $_POST['j1'];
$j2 = $_POST['j2'];
$j3 = $_POST['j3'];
$j4 = $_POST['j4'];
$j5 = $_POST['j5'];
$j6 = $_POST['j6'];
$j7 = $_POST['j7'];
$j8 = $_POST['j8'];
$desc10 = $_POST['desc10'];
//Todo esquema para linha 11
$k1 = $_POST['k1'];
$k2 = $_POST['k2'];
$k3 = $_POST['k3'];
$k4 = $_POST['k4'];
$k5 = $_POST['k5'];
$k6 = $_POST['k6'];
$k7 = $_POST['k7'];
$k8 = $_POST['k8'];
$desc11 = $_POST['desc11'];
//Todo esquema para linha 12
$l1 = $_POST['l1'];
$l2 = $_POST['l2'];
$l3 = $_POST['l3'];
$l4 = $_POST['l4'];
$l5 = $_POST['l5'];
$l6 = $_POST['l6'];
$l7 = $_POST['l7'];
$l8 = $_POST['l8'];
$desc12 = $_POST['desc12'];
Any ideas for me to improve this code?
By your question, I can not understand what you are wanting. Please edit the question, being more specific. Otherwise it shall be closed.
– Wallace Maxters
I think now will be better understanding @Wallace Maxters just edited.
– gezer
@Ezer post your form where all this data comes from.
– Thomas Lima
as it did not fit all the code I posted in jsfiddle
– gezer
You need to clarify what the problem is?
– Jorge B.
@Jorge B. the problem has been solved
– gezer