1. Engineering
  2. Computer Science
  3. i have the pics in my database i want them...

Question: i have the pics in my database i want them...

Question details

Show: Start row: ort by keyNone Options Number of rows: 30 Headers every 100 rows bookid title publisher price form nstock description image number of pages O Edit Copy Delete nd Peace NULL New English Library 12.99 paperback New English Library 11.99 paperback 1War and Peace is a vast epic centred on Napoleons 1 Anna Karenina is one of the most loved and warandpeace.jpg Edit }i Copy Delete 2 Anna Karenina Edit Copy Delete 3Doctor Who and the Pyramids of Target . O Check All With selected:/ Change.Delete 屡Export Show: Start row: Number of rows: 30 Headers every 100 rows Query results operations annakarenina.jpg NULL memorab 7.99 paperback 1The mind of Sutekh the Destroyer is consumed with.. drwho.jpg NULL Mars Print view Print view (with full texts) Export ila Display chart围Create view< .> Not Secure alamou m4x10host.com/W8/EXERCISE%202/bookview.php?bookid-1 War and Peace War and Peace is a vast epic centred on Napoleons war with Russia. While it expresses Tolstoys view that history is an inexo hundred characters. Three of these, the artless and delightful Natasha Rostov, the world-weary Prince Andrew Bolkonsky an mastery. This translation is one which received Tolstoys approval Publisher: New English Library In stock: Yes PRICE: £12.99 Back to list

I have the pics in my database i want them to display correctly?

<?php
require_once "lib/dbutils.php";
?>
<html>
<body>
<?php
$pdo = connect();
$results = $pdo->query("SELECT * FROM books WHERE bookid=".$_REQUEST['bookid']);
foreach( $results as $row) {
print("<tr>");
print("<h1>".$row['title']."</h1>");
print("<table><tr>");
print("<td valign='top'><img src='image'></td>");
print("<td>".$row['description']."</td>");
print("</tr></table>");
print("<ul>");
print("<li>Publisher: ".$row['publisher']."</li>");
if ( $row['instock'] == 1) {
print("<li>In stock: Yes</li>");
} else {
print("<li>In stock: No</li>");
}
print("</ul>");
print("<p><big><strong>PRICE: &pound;".$row['price']."</strong></big></p>");
}
?>
<p><a href="books.php">Back to list</a></p>
</body>
</html>

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution