File: WIAdmin/WIModule/modules/books.php

Recommend this page to a friend!
  Classes of Jules Warner  >  WICMS  >  WIAdmin/WIModule/modules/books.php  >  Download  
File: WIAdmin/WIModule/modules/books.php
Role: Example script
Content type: text/plain
Description: Example script
Class: WICMS
Database driven content management system with PDO
Author: By
Last change:
Date: 3 years ago
Size: 731 bytes


Class file image Download
ini_set('display_errors', '1');

// all books
$query = $db_conn->query('SELECT * FROM books');

$books = [];

$row = $query->fetch_object())
$books[] = $row;

<div class="books">
<?php foreach($books as $book);?>
<div class="book">
<div class="book_img">
<a href="pandora.php?id=<?php echo $book->id ;?>"><img style="border:#666 1px solid;" src="img/books/<?php echo $book->id ;?>.jpg" alt="<?php echo $book->title ;?>" width="150" height="300" border="1" /></a>

<div class="title"><?php echo $book->title ;?></div>
<div class="desc"><?php echo $book->descrption ;?></div>
<div class="price"><?php echo $book->price ;?></div>
<div class="book_rating">Rating: x/5</div>


For more information send a message to info at phpclasses dot org.