Lost and Found Books Library

Book Auth. Last Auth. First Genre
Pride and PrejudiceAustenJaneRomance
The SecretByrneRhondaSelf-help
Without RemorseClancyTomMystery/Thriller
Wheedle on the NeedleCosgroveStephenChildren
Dingode LintCharlesFantasy
Oliver TwistDickensCharlesLiterature
SulaMorrisonToniLiterature
Dance Upon the AirRobertsNoraRomance
Toni Morrison (Journey to Freedom)RobinsAmyBiographies
Web Database Applications with PHP/MySQLWilliamsHughInstructional

*Database Status: Connection Success!
*The time is now: 12:53 AM EST.

EST
5.3.6

Source Code for Current Page

<?php $siteName 'LzyDaz Designs<br /><em><span class="white-text">www.lzydaz.com</span></em>'?>
<?php 
include($_SERVER['DOCUMENT_ROOT'] . '/lvs/php101/week6/includes/bookFunctions.php'); ?>
<?php $books 
getBooks(); ?>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<link href="../common/site.css" rel="stylesheet" type="text/css" />
<link href="<?php ($_SERVER['DOCUMENT_ROOT']); ?>/lvs/php101/week5/common/week5.css" rel="stylesheet" type="text/css" />
</head>

<body>

<div id="head">
<p><?php echo $siteName?></p>
</div><!--close #head-->

<div id="wrap">
<div id="content">

<div id="bar-nav">
<?php include($_SERVER['DOCUMENT_ROOT'] . '/lvs/php101/includes/bar-nav.php'); ?>
</div><!--close bar-nav-->

<div id="library">
<h1>Lost and Found Books Library</h1>

<div id="navcontainer">
<ul> 
<li><a href="../week6.php" title="Return to Main">Main</a></li>
<li class="last"><a href="genre.php" title="Select by Genres">Genres</a></li>
</ul>
</div><!-- close navcontainer -->
<?php

if(count($books))
{
    
    
//display books
?>    


  <table> 
  
      <tr>
          <th>Book</th>
          <th>Auth. Last</th>
          <th>Auth. First</th>
          <th>Genre</th>
      </tr>
        
        <?php
    
}//endif
    
    
foreach($books as $book) {
    if(
==($i++ % 2)){//check for even row
                    
echo ('<tr>');//each row begins with <tr>                
            
}else{
                    echo(
'<tr class="alternate">');//odd row
                
}//end else    
                        
                
echo "<td>" $book['bookTitle'] . "</td>";
                echo 
"<td>" $book['authorLast'] . "</td>";
                echo 
"<td>" $book['authorFirst'] . "</td>";
                echo 
"<td>" $book['genre'] . "</td>";
                                
                echo 
"</tr>\n";//end the row
    
    
}//endforeach
    
        
?>  
            
  </table>

</div><!--close #library-->

<p><span class="note">*Database Status:</span> <?php print testConnection(); ?><br />
<span class="note">*The time is now:</span> <?php echo date("g:i A"); ?> EST.</p>

</div><!--close #content-->
</div><!--close #wrap-->

<div id="foot">
<?php include($_SERVER['DOCUMENT_ROOT'] . '/lvs/php101/includes/copyright.php'); ?>
</div><!--close #foot-->
<div id="source">
<?php echo date("T"); ?>
<hr />
<?php echo phpversion(); ?>
<hr />
<p>Source Code for Current Page</p>
<?php show_source(basename($_SERVER['PHP_SELF'])); ?>
</div><!--close #source-->

</body>
</html>