Hi guys,
So I’ve trying to post a Colour hexa code, a name and surname to a database but I think I’m missing something. Because the execution to the data base does not work. The connection to the right server is made but I cannot execute the data.
// input
if(isset($_POST['submit'])){
$color = $_POST['favcolor'];
$name = $_POST['name'];
$surname = $_POST['surname'];
$sql = "INSERT INTO STUDENTEN(color, name, surname) values( $color, '$name','$surname')";
}
if(mysqli_query($conn,$sql)){
echo "Records inserted successfully.";
} else{
echo "ERROR: Could not able to execute $sql. " . mysqli_error($conn);
}
Thank you