Show Random Topic

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

    Show Random Topic

    Code:
        
    echo "
    Random Topic
    ";   
    $lpt = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_topics ORDER BY RAND() LIMIT 1"));
    $tlnm = htmlspecialchars($lpt[1]);
    $tpclnk = "<a
    href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$lpt[0]&amp;go=last\">$tlnm</a>";
    echo "$tpclnk
    ";

    #2
    and random photo at index page how I can add???
    if like my post click:

    http://coding-talk.com/images/totall...ost_thanks.gif

    Comment


      #3
      Code:
      $lpt = mysql_fetch_array(mysql_query("SELECT pictureurl FROM gallery ORDER BY RAND() LIMIT 1")); echo "<img src=\"$lpt[0]\" alt=\"pic\"/>
      
      ";

      Comment


        #4
        $random = mysql_fetch_array(mysql_query("SELECT url, uid FROM table_gallery ORDER BY RAND() LIMIT 1"));
        echo "<img src=\"$random[0]\" alt=\"$random[1]\"/>";
        echo "
        ";
        $nick = getnick_uid($random[1]);
        $urlnick = "<a href=\"index.php?action=viewuser&amp;sid=$sid&amp; who=$random[1]\"/>$nick</a>";
        echo "by: $urlnick";
        echo "

        ";[/b]
        // for width n height .. just use the coded ~

        echo "<img src=\"$random[0]\" width=\"#\" height=\"#\" alt=\"$random[1]\"/>";

        Comment


          #5
          but work at wapdesire script???
          if like my post click:

          http://coding-talk.com/images/totall...ost_thanks.gif

          Comment


            #6
            Modify it yourself for wapdesire but keep it in your mind that wapdesire&#39;s gallery works without database

            Comment


              #7
              I try but not work...

              Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in
              if like my post click:

              http://coding-talk.com/images/totall...ost_thanks.gif

              Comment


                #8
                I try but not work...

                Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in[/b]
                do you even have the table "table_gallery" in your database?

                Comment


                  #9
                  sweetangel try this

                  $rnd = mysql_fetch_array(mysql_query("SELECT itemurl FROM fun_gallery ORDER BY RAND() LIMIT 1")); echo "<img src=\"$rnd[0]\" alt=\"pic\"/>

                  ";

                  this will work for u
                  Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                  <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                  Comment


                    #10
                    I use this gallery:
                    http://www.2wap.org/forums/Photo-Gallery-t4675.html
                    if like my post click:

                    http://coding-talk.com/images/totall...ost_thanks.gif

                    Comment


                      #11
                      how do i edit the random topic so it show the last topic posted / replied to
                      Wapchat4u


                      Topsites4u

                      Comment


                        #12
                        sweetangel try this

                        $rnd = mysql_fetch_array(mysql_query("SELECT itemurl FROM fun_gallery ORDER BY RAND() LIMIT 1")); echo "<img src=\"$rnd[0]\" alt=\"pic\"/>

                        ";

                        this will work for u [/b]

                        this work but at my gallery not found images now try upload 1
                        if like my post click:

                        http://coding-talk.com/images/totall...ost_thanks.gif

                        Comment


                          #13
                          I upload the photo but not open...why???any1 can help?
                          if like my post click:

                          http://coding-talk.com/images/totall...ost_thanks.gif

                          Comment


                            #14
                            sweetangel try this

                            $rnd = mysql_fetch_array(mysql_query("SELECT itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 1")); echo "<img src=\"$rnd[0]\" alt=\"pic\"/>

                            ";

                            this will work for u [/b]
                            this time it will work

                            $rnd = mysql_fetch_array(mysql_query("SELECT itemurl FROM ibwf_gallery ORDER BY RAND() LIMIT 1")); echo "<img src=\"$rnd[0]\" alt=\"pic\"/>

                            ";
                            Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                            <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                            Comment


                              #15
                              how would i pull male and female tables saperately?
                              Failure is not when a girls leaves you, its only when you let her go virgin. heheh!!

                              <span style="color:#9ACD32"><span style="font-size:36pt;line-height:100%">BEST MOBILE ADVERTISER</span></span>

                              Comment

                              Working...
                              X