Random Member

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Random Member

    im trying to making a random member appear on my welcome page, but when i click on the random name it comes up as my details instead of the name im clicking on anyhow this is where ive got any help be great

    <?php

    /*
    RANDY LINK
    by immortal
    */

    $query = "SELECT * from members ORDER BY RAND(" . time() . " * " . time() . ") LIMIT 1";
    $result = mysql_query($query);
    $num_rows = mysql_num_rows($result);
    $rowrandy = mysql_fetch_array($result);

    $go = $rowrandy[&#39;username&#39;];
    $id = $rowrandy[&#39;id&#39;];
    echo "<a href=\"profile.php?id=$id&amp;name=$name&amp;usern ame=$username&amp;password=$password\">$go</a>
    " ;

    ?>

    #2
    this is mine i made few weeks back for my sites, jus edit accordingly

    Code:
    $query = "SELECT * from mems ORDER BY RAND(" . time() . " * " . time() . ") LIMIT 1";
    $result = mysql_query($query);
    $num_rows = mysql_num_rows($result);
    $random = mysql_fetch_array($result);
    
    $profile = $random[&#39;username&#39;];
    echo "<a href=\"profile.php?name=$profile&amp;username=$username&amp;session=$session\">$profile</a>
    ";
    Want something coded email me at sales@webnwaphost.com for a prices.




    Comment


      #3
      this is mine i made few weeks back for my sites, jus edit accordingly

      Code:
      $query = "SELECT * from mems ORDER BY RAND(" . time() . " * " . time() . ") LIMIT 1";
      $result = mysql_query($query);
      $num_rows = mysql_num_rows($result);
      $random = mysql_fetch_array($result);
      
      $profile = $random[&#39;user&#39;];
      echo "<a href=\"profile.php?name=$profile&amp;username=$username&amp;session=$session\">$profile</a>
      ";
      [/b]


      ok cheers brum

      Comment


        #4
        no probs
        Want something coded email me at sales@webnwaphost.com for a prices.




        Comment


          #5
          Closed

          Comment

          Working...
          X