[FX.php List] LinkNext - seriously, hands in the air...

Ben Rollins ben at eldertreks.com
Tue Oct 12 08:41:20 MDT 2004


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>&nbsp;</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>&nbsp;</td>
<td><?php echo $recordData['name_first'][0]; ?>&nbsp;</td>
<td><?php echo $recordData['name_last'][0]; ?>&nbsp;</td>
</tr>
<?php
}
?>
</table>

<?php echo "<a href=\"" . $result['linkNext'] . "\">Next</a>"; ?>

  
<?php
}
?>
</body>
</html>



More information about the FX.php_List mailing list