daily pastebin goal
47%
SHARE
TWEET

Untitled

a guest Feb 4th, 2016 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <section id="disseny_web" class="content-section text-center">
  2.         <div class="bs-example" data-example-id="thumbnails-with-custom-content">
  3.         <div class= "container">
  4.         <font color="red">      <h2>DISSENY WEB</h2></font>
  5.                    <p>ANAR-HI per a veure cadasquna d'aquestas WEBS .</p>
  6.     <div class="row">
  7.  
  8.  
  9. <?php
  10. $servername = "SERVIDOR";
  11. $username = "USUARI";
  12. $password = "PARAULA DE PAS";
  13. $dbname = "BASE DE DADES";
  14. // Create connection
  15. $conn = new mysqli($servername, $username, $password, $dbname);
  16. // Check connection
  17. if ($conn->connect_error) {
  18.      die("Connection failed: " . $conn->connect_error);
  19. }
  20. $sql = "SELECT * FROM `producte` WHERE `categoria`='disseny_web'";
  21. $result = $conn->query($sql);
  22. if ($result->num_rows > 0) {
  23.      // output data of each row
  24.      while($row = $result->fetch_assoc()) {  
  25.  
  26. echo "<div class=  col-md-4 >";
  27. echo "<div class=thumbnail>";
  28. echo "<img src='$row[url_imatge]'alt=Item 1 width=100%  class=img-responsive>";
  29. echo "<div class=caption>";
  30. echo "<h3>$row[nom_producte]</h3>";
  31. echo "<p>$row[descripcio_producte]</p>";
  32. echo "<p><a href=$row[url_link] class= btn btn-primary btn-lgrole=button >anar-hi</a></p>";
  33. echo "</div>";
  34. echo "</div>";
  35. echo "</div>";
  36.    
  37.      }
  38. } else {
  39.      echo "0 results";
  40. }
  41. $conn->close();
  42.  ?>
  43.  
  44. </div>
  45.             </div>
  46.         </div>
  47.     </section>
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