Assuming that all% of% of inputs have the same name as the column of the database.
public function create(){
// o que está abaixo é um exemplo com os dados já populados
$arrayDados= Input::all();
unset($arrayDados["_token"]);
/*$arrayDados = array(
"valor1" => "teste",
"valor2" => "1234",
"valor3"=>1234
);
DB::table("tabela")->insert($arrayDados );*/
DB::table("tabela")->insert($arrayDados );
}
//HTML
<input type="text" name="valor1"/>
<input type="text" name="valor2"/>
<input type="text" name="valor3"/>
//Na tabela do banco de dados
coluna de nome: | valor1 | valor2 | valor3 |
I have 4 forms of ENEM questionnaires (ranging from school material) with 100 questions each. There are several names
, radios buttons
etc. in my view, I find it hard to bind each of the textareas
of name's
to the bank column. Is it a good practice? is there any security breach that could happen?