Advertisement
Guest User

Untitled

a guest
Jan 19th, 2016
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.09 KB | None | 0 0
  1.  
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  4.  
  5. <head>
  6. <title>Daniël & Tom</title>
  7. <meta name="description" content="free website template" />
  8. <meta name="keywords" content="enter your keywords here" />
  9. <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  10. <meta http-equiv="X-UA-Compatible" content="IE=9" />
  11. <link rel="stylesheet" type="text/css" href="css/style.css" />
  12. <link href="css/portfolio.css" rel="stylesheet" type="text/css" />
  13. <link href="css/dark.css" rel="stylesheet" type="text/css" />
  14. </head>
  15.  
  16. <body>
  17. <div id="main">
  18. <div id="header">
  19. <div id="welcome">
  20. <h1><span>KOOK</span> SHOP</h1>
  21. </div><!--end welcome-->
  22. <div id="menubar">
  23. <ul id="menu">
  24. <li><a href="index.php">Home</a></li>
  25. <li><a href="about.php">About</a></li>
  26. <li><a href="testimonials.php">Testimonials</a></li>
  27. <li class="current"><a href="producten.php">Producten</a></li>
  28. <li class="last"><a href="register.php">Register/login</a></li>
  29. </ul>
  30. </div><!--end menubar-->
  31. </div><!--end header-->
  32.  
  33. <div id="site_content">
  34.  
  35. <div id="text_content">
  36. <h2>Recente producten</h2>
  37. <!-- ditkom uitde datbase -->
  38. <?php
  39. $servername = "localhost";
  40. $username = "root";
  41. $password = "usbw";
  42. $dbname = "kookshop";
  43.  
  44. $conn = mysqli_connect($servername, $username, $password, $dbname);
  45. if (!$conn) {
  46. die("Connection failed: " . mysqli_connect_error());
  47. }
  48.  
  49. $sql = "SELECT productnaam, productcategorie, productprijs FROM producten order by productcode desc limit 10";
  50. $result = mysqli_query($conn, $sql);
  51.  
  52. if (mysqli_num_rows($result) > 0) {
  53. while($row = mysqli_fetch_assoc($result)) {
  54. echo "productnaam: " . $row["productnaam"]. " - Productcategorie: " . $row["productcategorie"]. " €" . $row["productprijs"]. "<br>";
  55.  
  56. }
  57. } else {
  58. echo "0 results";
  59. }
  60. mysqli_close($conn);
  61. ?>
  62.  
  63.  
  64.  
  65.  
  66. </div><!--close text_content-->
  67.  
  68. <div class="static_image">
  69. <img width="500" height="450" src="CKVP2/product.jpg" alt="product" />
  70. </div>
  71.  
  72. </div><!--end site_content-->
  73. </div><!--end main-->
  74.  
  75. <div id="footer">
  76. <div id="footer_container">
  77. <div class="footer_container_box">
  78. <h4>Info</h4>
  79. <p> Who are we?.</p>
  80. <a href="about.php">Read more</a>
  81. </div><!--close footer_container_box-->
  82. <div class="footer_container_box">
  83. <h4>Latest Testimonials</h4>
  84. <p> Lees en deel verhalen over jezelf en je werkstukken.</p>
  85. <a href="testimonials.php">Read more</a>
  86. </div><!--close footer_container_box-->
  87. <div class="footer_container_boxl">
  88. <h4>Latest Products</h4>
  89. <p> Zie hier de meest recente producten.</p>
  90. <a href="producten.php">Read more</a>
  91. </div><!--close footer_container_box1-->
  92. <br style="clear:both"/>
  93. <br />
  94. Website by Daniël & Tom
  95. </div><!--close footer_container-->
  96. </div><!--close footer-->
  97.  
  98. </body>
  99. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement