-2

i have the following code that generate some images with urls associated from database:

<html>
<head>
    <title></title>

</head>

<body>

<div id="datacontainer">


<?php
ini_set('display_errors', 0); 
 header('Content-type: text/html; charset=UTF-8') ; 


//Retriving informations from database

    mysql_connect("****", "****", "*****");

    mysql_select_db("*****);

    $result = mysql_query("SELECT * FROM table ORDER BY  RAND() LIMIT 52");



print "<table  width='200' border='0'  ><style>
 td {overflow:hidden;}
</style> ";
 while($row = mysql_fetch_array($result, MYSQL_ASSOC))

    {    


                $link=$row['url'];
                $title=$row['siteTitle'];                              
                $thumb= $row['url'];




  print "          <tr>
    <td><div style= 'text-align:center;height:90px;padding: 5px 5px 5px 5px;overflow:hidden;'><a href='$link' target='_blank'><img src='http://open.thumbshots.org/image.pxf?url=$thumb'/></a></div></td>
  </tr>
  <tr>
    <td><div style= 'text-align:center;height:20px;padding: 5px 5px 5px 5px;overflow:hidden;'><a href='$link'target='_blank'><font color='0000ff'>$title </font></a></div></td>
  </tr>";



  }
print"</table>";





?>




</div>



</body>
</html>

i need of implement a auto horizontal scroller of this images from left to right possibly with a width of container of max 4 images I'm searching a gallery image script or similar can you help me? thanks

grigione
  • 697
  • 2
  • 11
  • 37
  • 1
    That's a pretty incomprehensible request you have there. Any chance you can reword it/put some effort into describing what you're actually trying to work out? – Doug Oct 31 '11 at 13:05
  • excuse me for bad english i wat this http://www.benjaminkeen.com/software/image_scroller/ – grigione Oct 31 '11 at 13:07

1 Answers1

1

I guess you are mentioning about an Image gallery. Well there are many of them available (one can be found here - http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm ). You will have to modify your current code though in order to incorporate a gallery and provide the gallery code with the inputs it expects.

Hope this helps.

netemp
  • 4,115
  • 12
  • 43
  • 63
  • ok how modify table in gallery? thanks for moment – grigione Oct 31 '11 at 13:10
  • @grigone You need to put a little of your _own_ effort into this. We're not Rentacoder. – Bojangles Oct 31 '11 at 13:15
  • Go through the javascript code of the gallery, you will find that an array leftrightslide is getting created which contains the image tags. You will have to provide the images same way to it. Give this code a try, by reading it. You should be able to implement it smoothly. – netemp Oct 31 '11 at 13:16