0
I have a small question about saving a form in mysql that is. I have a form that is divided into 2 and I want it to be stored in the same table.
When I save only make save the second part of mysql it erases me the first.
Example Formulary1: Name, function Insert into the comic book:
$sqlinsert = "Insert into tb_trabalhador (Nome, funcao) Values ('".$Nome."','".$Funcao."')";
mysql_query($sqlinsert) or die(mysql_error());
if ($sqlinsert)
Formulario2: Letter, date of birth Insert into the comic book:
$sqlinsert = "Insert into tb_trabalhador (Cartao, Data) Values ('".$Cartao."','".$Data."')";
mysql_query($sqlinsert) or die(mysql_error());
if ($sqlinsert)
It seems you are recreating the variable and overwriting the query, post more of your code so we can understand.
– abfurlan
but it’s two different php pages. I don’t think it interferes
– ChrisAdler
You can interfere yes. We need to see more code to help.
– Oralista de Sistemas
The two are exactly the same in the Insert part. Only changes are the fields.
– ChrisAdler
Changing only sqlinsert2 , sqlinsert3... can now help work?
– ChrisAdler