<?php
    
if (!isset($_GET['book'])) {
    echo 
"The book is not defined .. ";
    } else 
{

    
$id_book $_GET['book'];

    
$sql  "SELECT book_id, book_name, book_description, book_image FROM sc_books WHERE book_id = $id_book";
    
$result mysql_query($sql) or die('Error, get image info failed. ' mysql_error());

    if (
mysql_num_rows($result) == 0) {
    
?>
    <p align="center">The book is not found. Return to <a href="indexu.php?page=display_booksu">the book list page</a></p>
    <?php    
    
} else {
    
$this_book mysql_fetch_assoc($result);    
    
?>

    <table width="100%" border="0" cellpadding="2" cellspacing="1">
    <tr> 
    
    <td align="center"><img src="../images/scbooks/<?php echo $this_book['book_image']; ?>"></td>
    </tr>
    <tr>
    <td style="text-align:left"><?php echo $this_book['book_description']; ?></td>
    </tr>
    
        
    <tr> 
    <th> <a href="indexu.php"> Back home</a> 
    </th>
    </tr>
    
    
    </table>

    <?php
    
}
}
    
?>