6
I have the following code:
$con=mysqli_connect("localhost","esferinf_fpessoa","*****","esferinf_factura");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$sql = ($con, "INSERT INTO Entregas (dia, cliente, toalhetes, higienico, bidons)
VALUES ('$dia, $cliente',$toalhetes, $higienico, $bidons)");
$result = mysqli_query($sql);
// if successfully insert data into database, displays message "Successful".
if($result){
header('Location: index.php');
}
else {
echo "ERROR";
}
However, the data is not sent to the BD. What’s the matter?