<div> <h1> Physical Diagram </h1> <img class="dsgimage" src="images/physicaldg.jpg"/> </div> <div> <h1> Sql Designer view </h1> <img class="dsgimage" src="images/sqlrelation.jpg"/> </div> <?php // Include my book Class. include "classes/books.class.php"; books::connect_it(ConnectionFactory::connect()); // using the function to display all stored date from table books $books = books::allbooks("book"); if ($books !== false) { echo "<h1> Books Table </h1>"; print "<table>\n <tr>\n <th> isbn </th>\n <th> title </th>\n <th> description </th>\n <th> price </th>\n <th> publisher </th>\n <th> edition </th>\n <th> pages </th>\n\n </tr>"; foreach ($books as $row) { echo '<tr><td>' . $row->isbn . '</td><td>' . $row->title . '</td><td>' . $row->description . '</td> <td>' . $row->price . '</td><td>' . $row->publisher . '</td><td>' . $row->edition . '</td><td>' . $row->pages . '</td></tr>'; } echo "</table>"; } // calling function from class to display all stored date from table categories $cat = books::allbooks("category"); if ($cat !== false) { echo "<h1> Categories Table </h1>";
<?php // Connection Details // CHANGE TO YOUR DATABASE DETAILS define("DB_DATA_SOURCE", "mysql:host=localhost;dbname=ifitness_db"); define("DB_USERNAME", "root"); define("DB_PASSWORD", ""); /* define( "DB_DATA_SOURCE", "mysql:host=localhost;dbname=u1153568" ); define( "DB_USERNAME", "u1153568" ); define( "DB_PASSWORD", "18aug93" ); */ // Class Configure function __autoload($class) { $folder = '/showcase'; //$folder = '/stud/u1153568/final/showcase'; require_once $_SERVER['DOCUMENT_ROOT'] . $folder . "/app/models/{$class}.php"; } include_once "functions.php"; $conn = ConnectionFactory::connect(); $imgFld = 'assets/img/';