hi,
i actually have no possibility to test the code, so it maybe contains errors.
try to understand it and ask if you have problems with it.
PHP-Code:
<?php
// start the session
session_start();
// number of results per page
$perpage = 2;
if( isset($_GET['start'],$_SESSION['result'])
&&
is_numeric($_GET['start'])
&&
$_GET['start'] > 0
&&
$_GET['start'] <= count($_SESSION['result'])
)
{
// show more pages
for( $i = $_GET['start']; $i < ($_GET['start']+ $perpage); $i++ )
{
if( $i < count($_SESSION['result']) )
{
echo ($i+1) . '. ' . $_SESSION['result'][$i] . '
';
}
}
// check if another 'next'-link is necessary
if( count($_SESSION['result']) > ($_GET['start'] + $perpage) )
{
echo '
';
echo '[url="' . $_SERVER['PHP_SELF'] . '?start=' . ($_GET['start'] + $perpage) . '"]next page[/url]';
}
}
else
{
// fill the resultset
// replace this with your search process
$_SESSION['result'] = array( 'first',
'second',
'third',
'fourth',
'fifth',
'sixth',
'seventh' );
// show the first page of results
for( $i = 0; $i < $perpage; $i++ )
{
if( $i < count($_SESSION['result']) )
{
echo ($i+1) . '. ' . $_SESSION['result'][$i] . '
';
}
}
// check if a 'next'-link is necessary
if( count($_SESSION['result']) > $perpage )
{
echo '
';
echo '[url="' . $_SERVER['PHP_SELF'] . '?start=' . $perpage . '"]next page[/url]';
}
}
?>
this is only an idea to solve your problem

maybe you can improve it?
have fun and success.
ben
edited:
i corrected the code. it contained several errors

sorry for that.
now you should be able to work with it.
@all:
hmm .. i posted wrong code and nobody realized it? :shosk:
why you do not try to answer questions that are written in English language?
maybe some of us should think about that.
und nein .. mein englisch ist wirklich nicht gut ^^