help with jQuery and MySQL
Hello,
I apologize in advance for my bad English
I'm new with java script and jQuery . so please forgive my ignorance
I found this
jQuery code watch I really like and hope to add it to my site
http://jqueryfordesigners.com/demo/infinite-carousel.html ( see the source code)
what i want is to add this code to my php file so the images will be from mysql
- <?php
if (!$yy || $yy["admin"]=="no")
{
// do nothing
}
else
{
if ($tr)
$sql = "SELECT image,filename
FROM {$TABLE_PREFIX}images
ORDER BY RAND()
LIMIT 0 , 5";
$row = do_sqlquery($sql) or err_msg($lan["ERROR"],$lan["error"].mysql_error());
if ($row)
{
while ($data=mysql_fetch_array($row))
{
if ( strlen($data["image"]) != '' )
{
}
}
}
else
{
echo "\n!!!!!!!!!!!!>";
}
print("\n</table>");
}
?>
I tried this
- <?php
if (!$yy || $yy["admin"]=="no")
{
// do nothing
}
else
{
if ($tr)
$sql = "SELECT image,filename
FROM {$TABLE_PREFIX}images
ORDER BY RAND()
LIMIT 0 , 5";
$row = do_sqlquery($sql) or err_msg($lan["ERROR"],$lan["error"].mysql_error());
?>
<div class="infiniteCarousel">
<div class="wrapper">
<ul>
<?php
if ($row)
{
while ($data=mysql_fetch_array($row))
{
if ( strlen($data["image"]) != '' )
{
echo "<li><a href='".$data["image"]."' title="whatever"><img src='".$data["image"]."' height=\"75\" width=\"75\" alt=\"whatever\" /></a></li>";
}
}
}
else
{
echo "\n!!!!!!!!!!!!>";
}
?>
</ul>
</div>
</div>
<?php
}
?>
but it's only shows one image in the code and 5 images in a list out site the code
Is it possible to get images links from mysql? And how?
thank you