Enter a new book into database.
Search for a book.
Accession Number (8 digits):
Title:
Author:
Edition:
Publisher:
Enter the title:
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; } } ?>