HELP ME WITH RANDOM GALLERY PIX for V2

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    HELP ME WITH RANDOM GALLERY PIX for V2

    Can somebody plz help me. i want the random gallery pix to show 6,
    3 on top
    and
    3underneath but no matter what i do it only shows 1!!!!

    i will tank whoever tries to help me..

    Im usin wapdesirev2 and heres the code im using



    $main.="<p style=\"text-align: center\">";
    $gallery=mysql_fetch_array(mysql_query("SELECT uid, path FROM gallery_files ORDER BY RAND() LIMIT 6"));
    $main.="<img src=\"$gallery[1]\" width=\"60\" height=\"60\"/><br/>";
    $main.="</p>";

    #2
    PHP Code:
    $main.="<p style=\"text-align: center\">";
    $gal mysql_query("SELECT uid, path FROM gallery_files ORDER BY RAND() LIMIT 6");
    while (
    $gallery=mysql_fetch_array($gal)){
    $main.="<img src=\"$gallery[1]\" width=\"60\" height=\"60\"/><br/>";
    }
    $main.="</p>"

    Comment


      #3
      printing the code 6 times on the same page is to much hard coding
      if you use a while or for loop you save resources and loading time

      Comment

      Working...
      X