This topic is locked

Records per page

9/28/2006 2:19:38 PM
PHPRunner General questions
author

Is it possible to save the last setting used for records per page so the next time the user signs on the new default will be their last setting.
Also, could something like this be applied to the search options, thus creating a filter that is set and stays set after viewing or logging back in?
Thanks

Alexey admin 9/29/2006

Hi,
you can save the number of pages value in cookies.

Modify generated ..._list.php for this.
Find this snippet there:

// page size

$PageSize=(integer)$_SESSION[$strTableName."_pagesize"];

if(!$PageSize)

$PageSize=$gPageSize;


// page size

$PageSize=(integer)$_SESSION[$strTableName."_pagesize"];

if(!$PageSize)

$PageSize=$_COOKIE[$strTableName."_pagesize"];


if(!$PageSize)

$PageSize=$gPageSize;

setcookie($strTableName."_pagesize",$PageSize,time()+360024365);



You can save the search parameters the similar way.