Html site 12 5/1/2017


SUBMITTED BY: canonical

DATE: May 2, 2017, 1:58 a.m.

FORMAT: HTML

SIZE: 1.4 kB

HITS: 329

  1. If you want more of my pastes visit: https://randompaste.000webhostapp.com/index.html
  2. --------------------------------------------------------------------------------------
  3. <html>
  4. <head>
  5. <title>WELCOME</title>
  6. <link rel="stylesheet" href="home.css">
  7. </head>
  8. <body>
  9. <?php
  10. include 'header.php';
  11. include 'vars.php';
  12. include 'sqls.php';
  13. ?>
  14. <?php
  15. // Create connection
  16. $conn = new mysqli($servername, $username, $password, $dbname);
  17. // Check connection
  18. if ($conn->connect_error) {
  19. die("Connection failed: " . $conn->connect_error);
  20. }
  21. $result = $conn->query($ManufacturerSQL);
  22. if ($result->num_rows > 0) {
  23. // output data of each row
  24. while($row = $result->fetch_assoc()) {
  25. echo "<h1>Welcome to " . $row["ManufacturerName"]. "</h1>";
  26. }
  27. } else {
  28. echo "<h1>Welcome</h1><br/>";
  29. }
  30. // Get Product Info
  31. $result = $conn->query($ProductSQL);
  32. if ($result->num_rows > 0) {
  33. // output data of each row
  34. while($row = $result->fetch_assoc()) {
  35. echo "<p>" . trim($row["ProductDescription"], " ") . "<p>";
  36. }
  37. } else {
  38. echo "0 results";
  39. }
  40. $conn->close();
  41. ?>
  42. <p> Want more information? Click on the Unicorn to find out how to have your own Unicorn Dreams!
  43. <a href="register.php">
  44. <img src="/images/unicorn_dreams_1920.jpg" alt="Unicorn Dreams JPG">
  45. </a>
  46. </body>
  47. </html>

comments powered by Disqus