Random Help

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

    Random Help

    I Need to add

    Random Member
    Random Blog
    Random Poll

    How do i add this.plz help me.
    thnkz in advance....
    <div align="center">My Web Community ......... http://pahasara.net



    </div>

    #2
    for random memeber
    Code:
    $sql = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_users ORDER BY RAND()  LIMIT 1"));
    echo "Random Member: <a href=\"index.php?action=viewuser&amp;who=$sql[0]&amp;sid=$sid\">$sql[1]</a>
    ";
    do the rest things by yourself.

    Comment


      #3
      for random memeber
      Code:
      $sql = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_users ORDER BY RAND()  LIMIT 1"));
      echo "Random Member: <a href=\"index.php?action=viewuser&amp;who=$sql[0]&amp;sid=$sid\">$sql[1]</a>
      ";
      do the rest things by yourself.[/b]

      thnkz bro .... i`ll try.....
      <div align="center">My Web Community ......... http://pahasara.net



      </div>

      Comment


        #4
        for random memeber
        Code:
        $sql = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_users ORDER BY RAND()  LIMIT 1"));
        echo "Random Member: <a href=\"index.php?action=viewuser&amp;who=$sql[0]&amp;sid=$sid\">$sql[1]</a>
        ";
        do the rest things by yourself.[/b]

        I`ll try to add Blog n Poll Like Dis Is It coorect..
        Code:
        $sql = "SELECT id, bname FROM ibwf_blogs WHERE bowner=&#39;".$who."&#39; ORDER BY RAND()  LIMIT 1";
        echo "<img src=\"../images/blogs.gif\" alt=\"*\"/> $f1<a href=\"lists.php?action=allbl&amp;sid=$sid\"> ";
        echo "Random blog ($noi[0])</a>$f2
        ";
        Code:
        $sql = "SELECT id, name FROM ibwf_users WHERE pollid>&#39;0&#39; ORDER BY RAND()  LIMIT 1";
         echo "<img src=\"images/polls.gif\" alt=\"*\"/>  $f1<a href=\"lists.php?action=polls&amp;sid=$sid\">";
        echo "Random poll($noi[0])</a>$f2
        ";

        thnkz in advance ....

        and how to add like dis
        Code:
        Newest Member
        JD (23/Male/UK)
        Single, 0 Credits
        <div align="center">My Web Community ......... http://pahasara.net



        </div>

        Comment


          #5
          I`ll try to add Blog n Poll Like Dis Is It coorect..
          Code:
          $sql = "SELECT id, bname FROM ibwf_blogs WHERE bowner=&#39;".$who."&#39; ORDER BY RAND()  LIMIT 1";
          echo "<img src=\"../images/blogs.gif\" alt=\"*\"/> $f1<a href=\"lists.php?action=allbl&sid=$sid\"> ";
          echo "Random blog ($noi[0])</a>$f2
          ";
          Code:
          $sql = "SELECT id, name FROM ibwf_users WHERE pollid>&#39;0&#39; ORDER BY RAND()  LIMIT 1";
           echo "<img src=\"images/polls.gif\" alt=\"*\"/>  $f1<a href=\"lists.php?action=polls&sid=$sid\">";
          echo "Random poll($noi[0])</a>$f2
          ";
          thnkz in advance ....[/b]
          these codes are worng and full of bugs
          for random poll the code is
          Code:
          $sql = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_users WHERE pollid>&#39;0&#39; ORDER BY RAND()  LIMIT 1"));
          if($sql[0]!="")
          {
          echo "<img src=\"images/polls.gif\" alt=\"*\"/>
          Random Poll :By <a href=\"index.php?action=viewpl&who=$sql[0]&sid=$sid\">$sql[1]</a>
          
          ";
          }
          and how to add like dis
          Code:
          and for this type new member&#39;s info
          Newest Member
          JD (23/Male/UK)
          Single, 0 Credits
          [/b]
          Code:
          $sql = mysql_fetch_array(mysql_query("SELECT id,name,plusses,sex,birthday,location  FROM ibwf_users ORDER BY regdate DESC LIMIT 0,1"));
          $uage = getage($sql[4]);
            if($nopl[3]==&#39;M&#39;)
            {
              $usex = "Male";
            }else if($sql[3]==&#39;F&#39;){
              $usex = "Female";
            }else{
              $usex = "Shemale";
            }
            $sql[5] = htmlspecialchars($sql[5]);
            
              echo "Newest Member
          <a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$sql[1]</a> ($uage/$usex/$sql[5])
          $sql[2] Credits
          ";
          if you have marittal status row in ibwf_users table add it in my code correctly
          and rest the random blog code,make it yourself coz I wont help you for copy and paste work

          Comment


            #6
            these codes are worng and full of bugs
            for random poll the code is
            Code:
            $sql = mysql_fetch_array(mysql_query("SELECT id, name FROM ibwf_users WHERE pollid>&#39;0&#39; ORDER BY RAND()  LIMIT 1"));
            if($sql[0]!="")
            {
            echo "<img src=\"images/polls.gif\" alt=\"*\"/>
            Random Poll :By <a href=\"index.php?action=viewpl&who=$sql[0]&sid=$sid\">$sql[1]</a>
            
            ";
            }
            Code:
            $sql = mysql_fetch_array(mysql_query("SELECT id,name,plusses,sex,birthday,location  FROM ibwf_users ORDER BY regdate DESC LIMIT 0,1"));
            $uage = getage($sql[4]);
              if($nopl[3]==&#39;M&#39;)
              {
                $usex = "Male";
              }else if($sql[3]==&#39;F&#39;){
                $usex = "Female";
              }else{
                $usex = "Shemale";
              }
              $sql[5] = htmlspecialchars($sql[5]);
              
                echo "Newest Member
            <a href=\"index.php?action=viewuser&who=$sql[0]&sid=$sid\">$sql[1]</a> ($uage/$usex/$sql[5])
            $sql[2] Credits
            ";
            if you have marittal status row in ibwf_users table add it in my code correctly
            and rest the random blog code,make it yourself coz I wont help you for copy and paste work[/b]
            thnkz bro it wrks....
            <div align="center">My Web Community ......... http://pahasara.net



            </div>

            Comment

            Working...
            X