misseether wrote:Hello everyone, I am trying to add information to a database... I have build a form and another file that I will show below, but it doesn't add any information to the database
Do you get any error?
Replace
$query="INSERT INTO script (ID, contentor, type, to, dateon, location, description, date, vessel, voyage)VALUES ('NULL', '".$contentor."', '".$type."', '".$to."', '".$dateon."', '".$location."', '".$description."', '".$date."', '".$vessel."', '".$voyage."')";
mysql_query($query) or die ('Erro ao adicionar contentor');
with
$query="INSERT INTO script (`contentor`, `type`, `to`, `dateon`, `location`,
`description`, `date`, `vessel`, `voyage`)
VALUES ('".$contentor."', '".$type."', '".$to."', '".$dateon."', '".$location."',
'".$description."', '".$date."', '".$vessel."', '".$voyage."')";
mysql_query($query) or die ('Erro ao adicionar contentor'. mysql_error());
If you face any error then post it here.