Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once('homePageFunctions.php');
- echo makeHeader("Northumbria Book Company (NBC)", "index.css", "
- Northumbria Book Company");
- echo makeMenu(array("index.php" => "Home", "display.php" => "Display All Books", "search.php" => "Search", "admin.php" => "Administrator", "credits.php" => "Credits"));
- echo startMainContent();
- ?>
- <h2>Search Page</h2>
- <!-- Creates the form for the add page -->
- <form action="searchISBN.php" method="get">
- <p> Search by Book ISBN</p>
- <div>Book ISBN: <input type="number" name="bookISBN" /></div>
- <input type="submit" name="submit" value="Search"/>
- </form>
- <form action="searchREST.php" method="get">
- <p>Search Using These Instead</p>
- <div>Book Title: <input type="text" name="bookTitle" /></div>
- <div>Book Year: <input type="text" name="bookYear" /></div>
- <div>Publisher Name:
- <select name="pubID"> <!-- Dynamically creates a select list using the data from the database. -->
- <?php
- include 'database_conn.php';
- $sql ='select distinct nbc_book.pubID, pubName
- from nbc_book
- inner join nbc_publisher
- on nbc_book.pubID = nbc_publisher.pubID';
- $queryresult = mysql_query($sql) or die (mysql_error());
- while ($row = mysql_fetch_assoc($queryresult))
- {
- $PubID = $row['pubID'];
- $PubName = $row['pubName'];
- echo "<option value=\"$PubID\"> $PubName </option>\n";
- }
- ?>
- </select>
- </div>
- <div>Category Desc:
- <select name="catID"> <!-- Dynamically creates a select list using the data from the database. -->
- <?php
- include 'database_conn.php';
- $sql = 'select distinct nbc_book.catID, catDesc
- from nbc_book
- inner join nbc_category
- on nbc_book.catID = nbc_category.catID';
- $queryresult = mysql_query($sql) or die (mysql_error());
- while ($row = mysql_fetch_assoc($queryresult))
- {
- $CatID = $row['catID'];
- $CatDesc = $row['catDesc'];
- echo "<option value=\"$CatID\"> $CatDesc </option>\n";
- }
- ?>
- </select>
- </div>
- <div class ="price">
- <ul class="checkbox">
- Book Price: <input type="text" name="bookPrice" />
- <input type="radio" name="bookPriceRadio" value="under">Under
- <input type="radio" name="bookPriceRadio" value="exact">Exactly
- <input type="radio" name="bookPriceRadio" value="over">Over
- </ul>
- </div>
- <input type="submit" name="submit" value="Search"/>
- </form>
- <?php
- echo endMain();
- echo makeFooter("Copyright 2009");
- ?>
Add Comment
Please, Sign In to add comment