2016-07-05 71 views
-1

我有一個名爲hotel_booking的數據庫,它包含名爲imglinks的字段,它存儲圖像的鏈接,我只能在網站中顯示單個圖像。我想顯示各個酒店圖像的幻燈片放映。使用php mysql顯示圖像幻燈片

<tr> 
    <th>NAME OF HOTELS</th> 
    <th>CATEGORY</th> 
    <th>DESCRIPTION</th> 
    <th>ADDRESS</th> 
    <th>GALLERY</th> 
</tr> 
<?php 
    while($row=mysql_fetch_array($query)) 
    { 
     $f1=$row['name']; 
     $f2=$row['category']; 
     $f3=$row['description']; 
     $f4=$row['address']; 

?> 
<tr> 
    <td><?php echo $f1 ?></td> 
    <td><?php echo $f2 ?></td> 
    <td><?php echo $f3 ?></td> 
    <td><?php echo $f4 ?></td> 
    <td><img src="<?php echo $row['imglinks'];?>" height="200" width="55"></td> 

link to image of what i want to achieve

+0

您是否嘗試過的jQuery或bootstarp? – aniruddh

回答

0

您可以使用引導程序與的幾行代碼輕鬆實現這一點。

通過這個鏈接,如果有任何問題,讓我知道:)

+0

是的我已經做了你所說的,但鏈接需要在我的情況是動態的,因爲不同的酒店需要有不同的圖像集,我只有一個鏈接是$ imglinks。 – samir