code:
<div id="galleryThumbnails">
<div id="motioncontainer" style="position:relative;overflow:hidden;" align="center">
<div id="motiongallery" style="top:0; white-space: nowrap;" align="center">
<nobr id="trueContainer">
<?php
$con=mysql_connect ("localhost", "gabellin_cristof", "knollstudio")
or die ('I cannot connect to the database because: ' . mysql_error()); //connect to server
mysql_select_db("gabellin_design", $con); //open database
$result = mysql_query("SELECT * FROM Gallery WHERE Keyword='$keyword'"); //open table
$row = mysql_fetch_array($result);
$dir = dir($row['Path'] . "little/");
$y=0;
while (($file = $dir->read()) !== false)
{
switch ($file)
{
case ".":
$y--;
break;
case "..":
$y--;
break;
default:
echo "<a href=\"#\" onClick=\"return modifyimage('galleryPicture', " .$y. ")\"><img src='" . $row['Path'] .
"little/". $file . "' border='0' name='" . $file . "'></a>";
}
$y++;
}
$dir->close();
mysql_close($con);
?>
</nobr>
</div>
</div>
</div>