<?php
$Title=$_POST['title'];
$Price=$_POST['price'];
$Author=$_POST['author'];
$con=mysqli_connect('localhost','root');
mysqli_select_db($con,'BRM_DB');
$query="INSERT INTO book (title,Price,Author) VALUES ('$Title',$Price,'$Author')";
$result=mysqli_query($con,$query);
mysqli_close($con);
?>
<!DOCTYPE html>
<html>
<head>
<title>Insertion</title>
</head>
<body>
<h1>Book Record Management</h1>
<p>
<?php
if($result==1)
{
echo ("Record inserted");
}else {
echo ("insertion failed");
}
?>
</p>
<a href="insertform.php">click here</a>
</body>
</html>
it is coding and it gives me as result “insertion failed” why?