Hi, any one know how you add random image on the right side of the viewer ? Same as on this site Thanks
Hey, Seems that you are having trouble wid this script..Well here it goes.. Cheers i hope u have croped the images...if not plz put the dimensions on the image as per your desired width ////////////////////////it shows random 4 images/////////// ///////////$imageLeftId is the image id which appears on the left///// $selectQuery = "SELECT id,imageName FROM tbl_picture WHERE id='$imageLeftId' ORDER BY rand() LIMIT 4"; $resultQuery = mysql_query($selectQuery); $numRowsQuery = @mysql_num_rows($resultQuery); if($numRowsQuery > 0) { while($rowQuery = @mysql_fetch_array($resultQuery)) { $imageName = $rowQuery['imageName']; $path = "here goes the location of the image".$imageName; ?> <div> <?php if(file_exists($path) && $imageName!='') { echo("<img src='$path'>"); } else { echo("No image"); } ?> </div> <?php } } ?> PHP: Regards, Stylesofts Developing Team
Hi Stylesofts - I have jumped in here cause I thought it would be good I have tried adding your code to the viewer.php and the viewer.tpl (That was a reach - lol) and I get parse errors can you help me insert this into the right file and the right place Thanks in advance GMC