my query don't save data to the database.This is my code it save all the values corect in the query but did not save in database. same problem i faced in every web page.
<?php
require_once('config.php');
if(isset($_POST['submit'])){
$contactName = $_POST['Contact_Name'];
$companyName = $_POST['Company_Name'];
$phone = $_POST['phone'];
$cell = $_POST['cell'];
$fax = $_POST['fax'];
$website = $_POST['website'];
$email = $_POST['email'];
$emailForInvoice= $_POST['email-for-invoice'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipCode = $_POST['zip-code'];
$country = $_POST['myCountry'];
$sql = "INSERT INTO user_info (name, companyName, phone, cell, fax, website, email, invoiceMail, address, city, state, zipCode, country)
VALUES ('$contactName', '$companyName', '$phone', '$cell', '$fax', '$website', '$email', '$emailForInvoice', '$address', $city, '$state','$zipCode', '$country');";
echo "$sql";
$db->query($sql);
$result = mysqli_query($db,$sql);
if($result){
echo "Sucessfully Insert";
}else {
echo "Error in Query";
}``
}
?>