Advertisement
Guest User

Untitled

a guest
Sep 25th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. <?php
  2. $HOST="localhost";
  3. $NAME= "banco";
  4. $USER= "root";
  5. $PASS= "";
  6. $con=@mysqli_connect($HOST, $USER, $PASS, $NAME);
  7. if(!$con){
  8. die("faiô: ".mysqli_error($con));
  9. }
  10. if (@mysqli_connect_errno()) {
  11. die("Connect failed: ".mysqli_connect_errno()." : ". mysqli_connect_error());
  12. }
  13. ?>
  14. <div class="col-md-12">
  15. <div id="Carousel" class="carousel slide">
  16.  
  17. <!-- Carousel items -->
  18. <?php
  19. $sql_clientes=mysqli_query($con,"select * from clientes");
  20. $nums_slides=mysqli_num_rows($sql_clientes);
  21. ?>
  22.  
  23. <div class="carousel-inner">
  24. <?php
  25. $active="active";
  26. while ($rw_clientes=mysqli_fetch_array($sql_clientes)){
  27. ?>
  28. <div class="item <?php echo $active;?>">
  29. <img data-src="" alt="" src="img/clientes/<?php echo $rw_clientes['img'];?>" data-holder-rendered="true">
  30. </div>
  31. <?php
  32. $active="";
  33. }
  34. ?>
  35. </div>
  36. <a class="left carousel-control" href="#Carousel" role="button" data-slide="prev"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> <span class="sr-only">Previous</span> </a>
  37. <a class="right carousel-control" href="#Carousel" role="button" data-slide="next"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> <span class="sr-only">Next</span> </a>
  38. </div>
  39. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement