Re: Problem with code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Dec 5, 2004, at 9:05 PM, Richard Kurth wrote:

I am having a problem with the code below it provides the first page
with out any problem but when I select the next page it shows all the
results from the first page and the results from the second page. It
does the same thing on the third page also. I have been looking at it
for two days and can not fined the error in the code

<?php
include("include/common.php");
include("$config[template_path]/user_top.html");


I don't see where you set $page. And I'm betting that you don't. Variables are not persistent from one page-load to the next.

try adding this line in here:

$page = $_GET['page'];


// If current page number, use it
// if not, set one!
if(!isset($page)){
    $page = 1;
} else {
    $page = $page;
}

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux