SHARE
TWEET

Untitled

a guest Dec 3rd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.         require 'conn.php';
  3.         $sql = "SELECT p.nr_katalogowy, p.nazwa, p.opis, p.cena_netto, s.stawka, p.cena_brutto, p.stan_magazynowy, p.id_foto FROM produkt p join stawka_vat s on s.id = p.stawka_vat where p.nazwa_kategorii=1";
  4.         $result = $conn->query($sql);
  5.  
  6.  
  7. if ($result->num_rows > 0): ?>
  8.  
  9. <table>
  10.   <thead>
  11.     <tr>
  12.       <th>zdj</th>
  13.       <th>nr katalogowy</th>
  14.       <th>nazwa</th>
  15.       <th>opis</th>
  16.       <th>cena netto</th>
  17.       <th>vat</th>
  18.       <th>brutto</th>
  19.       <th>ilość</th>
  20.       <th></th>
  21.     </tr>
  22.   </thead>
  23.   <tbody>
  24.  
  25. <?php  while ($row = $result->fetch_row()): ?>
  26.  
  27.     <tr>
  28.  
  29.       <td><img src="<?php echo $sciezka_do_obrazka; ?>"></td>
  30.       <td><?php echo $nr_kat; ?></td>
  31.       <td><?php echo $nazwa; ?></td>
  32.       <td><?php echo $opis; ?></td>
  33.       <td><?php echo $cena_n; ?></td>
  34.       <td><?php echo $nr_kat; ?></td>
  35.       <td>23%</td>
  36.       <td><?php echo $cena_n * 1.23 ?></td>
  37.       <td><?php echo $ilosc; ?></td>
  38.       <td> <a href="/addtocart?productid=<?php echo $nr_kat; ?>">Dodaj do koszyka</a> </td>
  39.  
  40.     </tr>
  41.  
  42. <?php endwhile; ?>
  43.  
  44.   </tbody>
  45. </table>
  46.  
  47. <?php endif; ?>
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