1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Rep Power
    I need to divide up the messages of the Guestbook I made into more pages. I mean: I want to display 10 mexs per page.

    I prepared a counter which displays 10 mexs per page... but I don't know how to display the 2nd page (mex 11-20), 3rd (mex 21-30)etc...

    PLEASE, GIVE ME A SOLUTION! I paste the code of my guestbook with counter here under:


    class TQ_DB extends DB_Sql {
    var $Host = "mysqldb.thinkquest.org";
    var $Database = "C001515";
    var $User = "C001515";
    var $Password = "*******";

    $getGuests = new TQ_DB;
    $getGuests->query("SELECT * FROM Guest");

    echo "There are ".$getGuests->num_rows()." messages in our guestbook:";
    echo " 10 are displayed now";
    print "<br>";
    print "<br>";

    while($getGuests->next_record() && $count < 10){
    print "<table width="75%" border="1" cellspacing="0" cellpadding="0">";
    print "<tr>";
    print "<td>";
    echo "<p>Name: ".$getGuests->f("Name");
    echo "<br>Date: ".$getGuests->f("DayTime");
    echo "<br>City: ".$getGuests->f("City");
    echo "<br>Country: ".$getGuests->f("Country");
    echo "<br>Favourite Hero: ".$getGuests->f("FavouriteHero");
    echo "<br>Comments: ".$getGuests->f("Comments");
    print "</tr>";
    print "</td>";
    print "</table>";

  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Rep Power

    Read the following article....

    SR -

    "The fear of the LORD is the beginning of knowledge..."

Similar Threads

  1. Displaying an image linked from a database
    By DougsfastZ in forum Java Help
    Replies: 1
    Last Post: February 10th, 2004, 01:04 PM
  2. displaying data from a mysql database
    By baelnorn in forum Perl Programming
    Replies: 2
    Last Post: December 30th, 2003, 06:30 PM
  3. creating database & tables using ASP
    By pdxlooie in forum ASP Programming
    Replies: 2
    Last Post: December 26th, 2003, 05:27 PM
  4. displaying info from database
    By thindery in forum PHP Development
    Replies: 1
    Last Post: December 22nd, 2003, 12:06 AM
  5. distributing database reads among db slaves
    By JunkCookie in forum PHP Development
    Replies: 3
    Last Post: December 17th, 2003, 11:45 AM

IMN logo majestic logo threadwatch logo seochat tools logo