<!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");
$id=$row['book_id'];
$name=$row['book_name'];
$description=$row['description'];
$publisher=$row['publisher'];
$author=$row['author'];
echo "$name $description $publisher $author";


$sql = "UPDATE books SET book_name='$name',description='$description',publisher='$publisher',author='$author' WHERE book_id='$id'";

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


?>
</body>
</html>