Jump to content

how to show images horizntally by extracting records from database...!


asad_black

Recommended Posts

this is my sample page ...!

 

http://tutioninn.com/wallpaper.php

 

in which images in a table show in a vertical direction but i want to show it horizontal way..!

 

like this page:

http://neosmart.net/gallery/v/wallpapers/Vista/official/Textures/

 

this is my code of selecting record...!

 

if u have better code from this code kindly reply me as soon as possible.

 


$sql = "SELECT * FROM wallpapers ;
$result = mysql_query($sql); 

echo "<table border='1' cellpadding='3' cellspacing='3' width='60%'>";
echo "<tr>";
// while there are rows to be fetched...
while ($list = mysql_fetch_assoc($result)) {
   // echo data
       {

echo "<td ><a href=\"idpage.php?id=" . $list["id"] . "\"><img src=\"" . $list["w_th"] . "\" ></a></td>";

echo "<td ><a href=\"idpage.php?id=" . $list["id"] . "\">". $list['w_name']. "</a>";
echo "</td>";

}
echo "</tr>";
}



Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.