here to go back.";
break;
case "search_submit":
$connection = db_connect();
$query = "select * from book_table where title = '" . $_POST['title'] . "'";
$result = mysql_query ($query, $connection);
if ($result === false)
die ("Error fetching from database.");
if (mysql_num_rows ($result) == 0)
die ("Book not found. Click here to go back.");
$result = mysql_fetch_assoc ($result);
echo "Accession number: ${result['accession_no']}
";
echo "Title: ${result['title']}
";
echo "Author: ${result['author']}
";
echo "Edition: ${result['edition']}
";
echo "Publisher: ${result['publisher']}
";
echo ("Click here to go back.");
break;
}
}
?>