[FX.php List] LinkNext - seriously, hands in the air...
Kevin Futter
kfutter at sbc.melb.catholic.edu.au
Sun Oct 17 17:35:03 MDT 2004
Hi Ben,
I think you need to change this line:
$result->FMSkipRecords($_REQUEST['skip']);
to:
$search_result->FMSkipRecords($_REQUEST['skip']);
Also, the statement that does the actual find ($result =
$search_result->FMFind();) needs to be the very last statement (hence my
suggestion above).
At least, that's how I understand it!
I actually put the $_REQUEST['skip'] variable into another variable called
$skip and then use that as FMSkipRecords($skip).
Cheers,
Kevin
On 13/10/04 12:41 AM, "Ben Rollins" <ben at eldertreks.com> wrote:
> OK, I have wrestled with this over and over again, and cannot figure it
> out.
>
> This is a search page which works fine UNTIL you hit the next link, when I
> get a blank page. I know that means I screwed up, but I just can't figure
> out why. All I did was modify some of the code from one of FMWebSchool's
> php book.
>
> The code is below - can anyone tell me why the Skip breaks the page?
>
> Thanks,
>
> Hair-pulling,
>
> Ben.
>
> <?PHP
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/FX.php");
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/server_data.php");
> include_once($HTTP_SERVER_VARS['DOCUMENT_ROOT'] . "/FX/FMErrors.php");
>
> $search_result = new FX($serverIP,$webCompanionPort);
> $groupSize = 10;
> $search_result->SetDBData('Members.fp5','cgi', $groupSize);
> $result = $search_result->FMFind();
>
> if (isset($_REQUEST['skip']) && $_REQUEST['skip'] > 0) {
> $result->FMSkipRecords($_REQUEST['skip']);
> }
> ?>
>
> <html>
> <head>
> <title>Member Directory</title>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> </head>
>
> <body bgcolor="#FFFF99" text="#000088" leftmargin="0" topmargin="0"
> marginwidth="0" marginheight="0">
> <table width="100%" border="0" cellpadding="0" cellspacing="0"
> bgcolor="#000099">
> <tr>
> <td><div align="center"><b><font color="#FFFFFF" size="5" face="Arial,
> Helvetica, sans-serif">Member
> Directory</font></b></div>
> </td>
> </tr>
> </table>
> <p align="center"><font size="3" face="Arial, Helvetica,
> sans-serif"></font></p>
> <p> </p>
> <?php
> if ($result['foundCount']==0) {
> ?>
> No Found Records
> <?php
> }else{
> ?>
> <table width=50% border=1 cellspacing=0 cellpadding=1 align=center
> bgcolor=#FFFFCC>
> <tr><td>CompanyID</td><td>First Name</td><td>Last Name</td>
> <?php
> foreach ($result['data'] as $recordKey =>$recordData) {
> ?>
> <tr>
> <td><a href="member_detail.php?area=member_detail&company_id=<?php echo
> $recordData['company_id'][0];?>"><?php echo
> $recordData['company_id'][0];?></a> </td>
> <td><?php echo $recordData['name_first'][0]; ?> </td>
> <td><?php echo $recordData['name_last'][0]; ?> </td>
> </tr>
> <?php
> }
> ?>
> </table>
>
> <?php echo "<a href=\"" . $result['linkNext'] . "\">Next</a>"; ?>
>
>
> <?php
> }
> ?>
> </body>
> </html>
>
> _______________________________________________
> 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