Random article

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

    Random article

    Can you code this for me? Thanks..
    LESS TALK. LESS MISTAKE.

    HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

    #2
    U think this?

    PHP Code:
    // Random text
    $line[] = "Text1";
    $line[] = "Text2";
    $line[] = "Text3";
    $line[] = "Text4";
    $line[] = "Text5";

    // Random links
    $line["http://link1.tld"] = "Link1";
    $line["http://link2.tld"] = "Link2";
    $line["http://link3.tld"] = "Link3";
    $line["http://link4.tld"] = "Link4";
    $line["http://link5.tld"] = "Link5";

    $num count($line) - 1;

    srand ((double) microtime() * 1000000);

    $random rand(0,$num);

    $ranline $line[$random]; 

    //
    echo '<p>'.$ranline.'</p>'
    <!DOCTYPE html PUBLIC "-//WAPFORUM.RS

    Comment


      #3
      Originally posted by robzky View Post
      Can you code this for me? Thanks..
      yeh..it's very simple..lyk what wapmetal said..
      PHP Code:
      $article mysql_fetch_array(mysql_query("SELECT id, name FROM articles ORDER by RAND() LIMIT 1"));
      echo 
      "<a href=\"articles.php?id=$article[0]\">$article[1]</a>"
      this is just an example..edit it accdg. to your script..
      My Blog: http://jhommark.blogspot.com
      My Facebook: http://www.facebook.com/jhommark
      My Official Site: http://www.undergroundweb.tk
      My Community Site: http://undergroundwap.xtreemhost.com

      Comment


        #4
        Originally posted by robzky
        All users here starts from noob.. Ü anyway, how to reset all plusses of all members?
        a noob is different from a newbie..a newbie is one that just started while a noob is nothing more a newbie but still weak..hehe..tama ga ako?
        PHP Code:
        mysql_query("UPDATE ibwf_users SET plusses='0'");
        or try 
        this
        mysql_query
        ("UPDATE ibwf_users SET plusses='0' WHERE id>0"); 
        My Blog: http://jhommark.blogspot.com
        My Facebook: http://www.facebook.com/jhommark
        My Official Site: http://www.undergroundweb.tk
        My Community Site: http://undergroundwap.xtreemhost.com

        Comment


          #5
          I found a PHP Editor using mobile.. MOBILE PHP EDITOR (MPE) you can download at getjar.com...
          LESS TALK. LESS MISTAKE.

          HTTP://APPSROB.COM - LIST OF MY FACEBOOK APPS!

          Comment

          Working...
          X