0
        i want to display this slideshow dynamically  please help me. 
        I am getting more than
        3 images if i put dynamic code

        <div class="row">
        <div id="carousel-reviews" class="carousel slide" data-ride="carousel">

        <div class="carousel-inner">
        <div class="item active">
            <!-------------------------------->
            <div class="col-md-4 col-sm-6">
            <div class="block-text rel zmin">
            <a title="" href="#">Active1</a>

            </div>
            </div>

            <!-------------------------------->
            <div class="col-md-4 col-sm-6 hidden-xs">
            <div class="block-text rel zmin">
            <a title="" href="#">Avtive2</a>

            </div>
            </div>
            <!-------------------------------->
            <div class="col-md-4 col-sm-6 hidden-sm hidden-xs">
            <div class="block-text rel zmin">
            <a title="" href="#">Avtive3</a>

            </div>
            </div>
            <!-------------------------------->

        </div><!------------------------------//item1------------------------------->   

        </div> <!---carousel-reviews ---->


        <a class="left carousel-control" href="#carousel-reviews" role="button" data-slide="prev">
        <span class="glyphicon glyphicon-chevron-left"></span>
        </a>
        <a class="right carousel-control" href="#carousel-reviews" role="button" data-slide="next">
        <span class="glyphicon glyphicon-chevron-right"></span>
        </a>
   </div>

Edited by chaitu11

3
Contributors
3
Replies
15
Views
2 Years
Discussion Span
Last Post by mattster
0

This is only the HTML code. Can you upload a working do on jsfiddle.net to see what is actually happening? Or provide ONLY the relevant code here?

0
<?php
include('db.php');
$sel = mysql_query("select * from alumini");
?>
        <div class="row">
            <div id="carousel-reviews" class="carousel slide" data-ride="carousel">
              <div class="carousel-inner">


  <?php

  while($row = mysql_fetch_array($sel)){
  ?>
                    <div class="item active">
                     <!-------------------------------->
                        <div class="col-md-4 col-sm-6">
                            <div class="block-text rel zmin">
                               <?php
                                echo $row['alumini_name'];

                                ?>

                            </div>
                        </div>


                </div><!------------------------------//item1------------------------------->   
    <?php

    }
    ?>


                </div> <!---carousel-reviews ---->

                <a class="left carousel-control" href="#carousel-reviews" role="button" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span>
                </a>
                <a class="right carousel-control" href="#carousel-reviews" role="button" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span>
                </a>
            </div>
0

Maybe because there are more than 3 images in your database?

Try $sel = mysql_query("SELECT * FROM alumini LIMIT 3");

The LIMIT statment will only select 3 images.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.