Image Carousel PHP Mysql的后端

时间:2014-01-04 11:45:12

标签: php html mysql css photo

我真的不知道如何制作这张照片旋转木马后端,Pease,给出一个建议。这是我正在使用http://mabini150.net23.net/的网站。这里代码:

<div class="da-slide">
<h2>MABINI@150 Softlaunch@FAITH</h2>
<p>Mabini @150 with the commemoration of First Asia Institute Of      Technology and
Humanities.Visit the 
<a
href="Gallery.php">Gallery Page</a> for more photos.</p>
<div class="da-img"><img src="css/images/FaithMabini/1.jpg" alt="image01" /></div>
</div>

<div class="da-slide">
<h2>MABINI SHRINE VIRTUAL TOUR</h2>
<p>The Mabini Shrine Tanauan contains a museum and a library, designed by National
Artist for Architecture Juan
F.Nakpil.Visit the <a href="VirtualTour.php">Virtual Tour</a> and
feel like you're in the shrine.</p>
<div class="da-img"><img src="css/images/Mabini/virtual.PNG" /></div>
</div>

1 个答案:

答案 0 :(得分:0)

创建一个数据库表,其中包含您要添加图像的所有内容 例如(<P> <h2> <a href>)具有特定列名称,例如。 for <P> = about和for <h2> = heading and link for anchor tag,然后在主页上从数据库中获取,然后创建一个动态滑块,如下所示

       $query = 'select * from table';
      $result = mysql_query($query);
      while($row=mysql_fetch_array($result))
     {
     echo '<div class="da-slide">';
     echo '<h2>'.$row['heading'].'</h2>';
     echo '<p>'.$row['about'].'</p>';
     echo '<div class="da-img"><img src="'.$row['image'].'" alt="image01" /></div>
      </div>';
   }