<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
<?php
include("db.php");
$name=$_POST['book_name'];
$description=$_POST['description'];
$publisher=$_POST['publisher'];
$author=$_POST['author'];
echo "$name $description $publisher $author";

$sql = "INSERT INTO books (book_id, book_name, description,publisher,author)
VALUES (NULL, '$name', '$description','$publisher','$author')";

if ($conn->query($sql) === TRUE) {
  echo "New record created successfully";
  header( "location: index.php" );
} else {
  echo "Error: " . $sql . "<br>" . $conn->error;
}


?>
</body>
</html>