Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,575
    Habbo
    GoldenMerc

    Latest Awards:

    Default Random text genrator

    Hey,

    Im wanting a system where it gives a random quote every 2 mins I need it to be able to use with a panel, so i think it would have to add the the database then pick up from the database in the page?
    Ross

  2. #2
    Join Date
    Feb 2007
    Location
    Essex, England
    Posts
    1,392
    Tokens
    0

    Latest Awards:

    Default

    PHP Code:
    <?php

    include("config.php"); // your database connection, change as necessary.

    $amount mysql_num_rows(mysql_query("SELECT * FROM `quotes`"));
    $rand rand(1,$amount);

    $query mysql_query("SELECT * FROM `quotes` LIMIT $rand, 1;");
    $fetch mysql_fetch_array($query);

    echo( 
    $fetch['quote'] );
    echo(
    "<meta http-equiv='refresh' content='120;url=".$_SERVER['PHP_SELF']."'>");

    ?>
    I'm hoping that works. Obviously change table names, db connections etc as necessary.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •