hi
I am new in php. I could not insert the data into mysql table. and there is no error prompt Below is my code. Pls help me
<?php
include_once '../inc/header.php';
if (isset($_POST['submit']) && $_POST['submit'] != "" )
{
$name = $_POST["name"];
$address = $_POST["address"];
$tel = $_POST["tel"];
$fax = $_POST["fax"];
$email = $_POST["email"];
$website = $_POST["website"];
$type = $_POST["type"];
echo $name;
echo $address;
echo $tel;
echo $fax;
echo $email;
echo $website;
echo $type;
try
{
$sql="INSERT INTO bk_customer (id,name,address,tel,fax,email,type,website)
VALUES ('$name','$address','$tel','$fax','$email','$website','$type')";
$result = mysqli_query($con,$sql) ;
echo 'hi';
exit();
}
catch (Exception $ex)
{
echo $e->getMessage() . "\n";
file_put_contents('PDOErrors.txt', $e->getMessage(), FILE_APPEND);
exit();
}
}
mysqli_close($con);
?>