<? session_start(); include_once("class_session.php"); include_once("class_page.php"); include_once("class_query.php"); include_once("class_books_query.php"); $p=new Page(); $bookq=new Books_Query(); $bookq->selectDatabase(); $bookq->queryAllInfo(); $p->startTemplate('Online Library Book List') ?> <h1 align="center">Book List</h1> <table align="center" frame="box" rules="all"> <tr> <th>Author</th> <th>Title</th> </tr> <?while ($bookq->getBook()) {?> <tr> <td><?php echo $bookq->author; ?> </td> <td> <a href="viewbooks?bookid=<?php echo $bookq->bookid; ?> "> <?php echo $bookq->title;
<? session_start(); include_once("class_session.php"); include_once("class_page.php"); include_once("class_query.php"); include_once("class_books_query.php"); $p=new Page(); $bookq=new Books_Query(); if (preg_match("[0-9]",$_REQUEST[bookid])) { echo "ERROR: Need to select a valid book id"; exit; }; $bookq->selectDatabase(); $bookq->queryAllInfo(); $bookq->findBook($_REQUEST[bookid],'bookid'); $p->startTemplate(); ?> <table align="center" width="800"> <tr> <th> <h1><?php echo $bookq->author; ?> </h1> </th> </tr> <tr> <th> <h2><?php echo $bookq->title;