Help me please

Discussion in 'PHP' started by SellerD, Mar 14, 2009.

  1. #1
    How to Create a Simple Navigation Like Next-Previous with PHP(using DB information) :confused:
     
    SellerD, Mar 14, 2009 IP
  2. SellerD

    SellerD Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    for this page...

    <?php
    $result = mysql_query("SELECT id,meta_d,author,date,title FROM other",$db);
    $myrow = mysql_fetch_array($result);

    do
    {
    $id = $myrow['id'];
    if ($id != 0){
    printf("<table width='485' border='0'>
    <tr>
    <td width='200'><p class='class1'><a href='view_other.php?id=%s>'><p>%s</p></a>
    <td width='285'><p class='class1'>%s</p></td>
    </tr>
    <tr>
    <td width='200'><h4 class='class2'>Date:<br>Author:</h4></td>
    <td width='285'><h4 class='class2'>%s<br>%s</h4></td>
    </tr>
    </table><br>"
    $myrow['id'],$myrow['title'],$myrow['meta_d'],$myrow['date'],$myrow['author']);
    }
    else echo "<p class='class3'>No info in DB!!!</p>";
    }
    while($myrow = mysql_fetch_array($result));
    ?>
     
    SellerD, Mar 14, 2009 IP
  3. Masterful

    Masterful Well-Known Member

    Messages:
    1,653
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #3
    You need a pagination script. Look for PHP pagination scripts on Google. There are loads of them - some of them quite straightforward and easy to implement.
     
    Masterful, Mar 15, 2009 IP