[FX.php List] LinkNext - seriously, hands in the air...
Gjermund Gusland Thorsen
ggt667 at gmail.com
Sun Oct 17 03:01:05 MDT 2004
I have never used the internal linkNext/linkPrevious function,
I always use my own:
Please take a look at: http://ext.comitas.no/index.phps
ggt
On Sat, 16 Oct 2004 15:50:44 -0700, Brion Vibber <brion at pobox.com> wrote:
> On Oct 12, 2004, at 7:41 AM, Ben Rollins wrote:
> > The code is below - can anyone tell me why the Skip breaks the page?
>
> You're making a method call on an array, which results in a PHP fatal
> error. If your server is set not to log or display error messages,
> it'll just die at that point with no explanation... PHP is so helpful
> this way. :)
>
> Instead you need to run FMSkipRecords() on the FX object before calling
> FMFind(), so it knows which records to fetch.
>
> > $search_result = new FX($serverIP,$webCompanionPort);
> > $groupSize = 10;
> > $search_result->SetDBData('Members.fp5','cgi', $groupSize);
>
> add here:
> if (isset($_REQUEST['skip'] && $_REQUEST['skip'] > 0) {
> $search_result->FMSkipRecords(IntVal($_REQUEST['skip']));
> }
>
> (I suggest adding an IntVal() here as a general defensive programming
> practice; input from the web can't be trusted. Consider running
> htmlspecialchars() on output such as the link as well.)
>
> > $result = $search_result->FMFind();
>
> then remove this bit:
> > if (isset($_REQUEST['skip']) && $_REQUEST['skip'] > 0) {
> > $result->FMSkipRecords($_REQUEST['skip']);
> > }
>
> -- brion vibber (brion @ pobox.com)
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
>
More information about the FX.php_List
mailing list