Insert form data into the same table

-1

I have an extensive form so I separated the HTML and several parts but I want to continue to save in the same table.

Example:

$sqlinsert = "INSERT INTO tb_detalhe_trabalhador (Nome1, Funcao1, MedicaValidade) VALUES ('".$Nome1."','".$Funcao1."','".$MedicaValidade."')

if ($sqlinsert)
{
echo "<script>var r = confirm('Adicionar novo trabalhador?');" .
"if (r == true) {window.open('Trabalhadores2.html','_self','false');}" .
"else {window.open('Equipamentos.html','_self','false');}</script>";
 }

If the user confirms I want the insert another worker to open another form page and I want it to be saved

$sqlinsert = "INSERT INTO tb_detalhe_trabalhador (Nome2, Funcao2, MedicaValidade2) VALUES ('".$Nome2."','".$Funcao2."','".$MedicaValidade2."')

if ($sqlinsert)
{
echo "<script>var r = confirm('Adicionar novo trabalhador?');" .
"if (r == true) {window.open('Trabalhadores3.html','_self','false');}" .
"else {window.open('Equipamentos.html','_self','false');}</script>";
 }

Is it possible to stay the form?

    
asked by anonymous 12.06.2014 / 13:38

1 answer

0

Your question is not very clear, if you want to insert new users after inserting you can use JavaScript even for this, you can use location.href and everything should work normally.

If you have a form with many fields, and you have separated into several files, in that case you will have to use sessões to keep the data during the transaction of the pages, of course you can also create% input and pass the data again.

Try to better explain your problem and ask more objective questions.

    
13.06.2014 / 21:49