SHARE
TWEET

Untitled

a guest Jan 14th, 2020 135 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $conn = mysqli_connect("localhost", "root", "", "laptops");
  4. $sql = "SELECT marka.marka_ime, laptop.laptop_ime, laptop.cijena from marka left join laptop on marka.marka_id=laptop.marka_id";
  5. $result = $conn->query($sql);
  6. $row = $result->fetch_assoc();
  7.  
  8. ?>
  9.  
  10. <html>
  11. <head>
  12.  
  13. <!-- Latest compiled and minified CSS -->
  14. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
  15.  
  16. <!-- jQuery library -->
  17. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
  18.  
  19. <!-- Popper JS -->
  20. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
  21.  
  22. <!-- Latest compiled JavaScript -->
  23. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
  24.  
  25. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  26. <link rel="stylesheet" type="text/css" href="index.css">
  27. </head>
  28. <body>
  29. <h1>
  30.                 Laptop Selector
  31.             </h1>
  32.             <ul>
  33.                 <li><a href="pocetna.php">Home</a></li>
  34.                 <li><a href="test.php">Laptopi</a></li>
  35.                 <li><a class="active" href="proizvodaci.php">Proizvođaći</a></li>
  36.                 <li><a href="gaming.php">Gaming laptopi</a></li>
  37.                 <li><a href="search.php">Tražilica</a></li>
  38.                 <li><a href="shop.php">Kupovina</a></li>
  39.               </ul>
  40.  
  41. <br>
  42. <div class="container-fluid">
  43.  
  44.  
  45. <table class="table table-hover">
  46.     <thead>
  47.       <tr>
  48.         <th>Marka</th>
  49.         <th>Model</th>
  50.         <th>Cijena</th>
  51.      
  52.       </tr>
  53.     </thead>
  54.     <tbody>
  55.  
  56.     <?php
  57.  
  58. do {
  59.     echo "<tr>" .
  60.     "<td>" . $row["marka_ime"] . "</td>" .
  61.     "<td>" . $row["laptop_ime"] . "</td>" .
  62.     "<td>" . $row["cijena"] . "</td>" .
  63.  
  64.     "</tr>";
  65. }while ($row = $result->fetch_assoc())
  66.  ?>
  67.  
  68.  
  69. </div>
  70.  
  71.  
  72.  
  73. </body>
  74. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top