I was trying to insert the variables I received from a form when I received this error message:
'nidcrespons1' does not have a default value
My code:
<?php
$link = mysqli_connect("localhost", "root", "vertrigo", "winit");
$nomeempresa = $_POST["nomeempresa"];
$paisempresa = $_POST["paisempresa"];
$moradaempresa = $_POST["moradaempresa"];
$nifempresa = $_POST["nifempresa"];
$crc = $_POST["crc"];
$telefoneempresa = $_POST["telefoneempresa"];
$respons1 = $_POST["respons1"];
$nidcrespons1 = $_POST["nidcrespons1"];
$nifrespons1 = $_POST["nifrespons1"];
$emailempresa = $_POST["emailempresa"];
$senhaempresa = $_POST["senhaempresa"];
echo $nomeempresa;
echo $paisempresa;
$insere = mysqli_query($link, "INSERT INTO empresas (nomeempresa, respons1) VALUES ('$nomeempresa', '$respons1')") or die(mysqli_error($link));
?>