[FX.php List] Another Question Regarding LinkNext/LinkPrevious

Kim Hawksworth hawksworth-2 at medctr.osu.edu
Tue Oct 19 10:46:41 MDT 2004


Greetings Fellow List Members,

I'm trying to do a LinkNext/LinkPrevious from an FMFind();

My code looks like this:

<?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");

$resident_search = new FX($serverIP,$webCompanionPort);

$Lname = $_POST['Lname'];
$fname = $_POST['fname'];
$year_grad = $_POST['year_grad'];
$state = $_POST['state'];
$restype = $_POST['restype'];

$resident_search->SetDBData("resident_directory.fp5", "detail", "25");

$resident_search->AddDBParam("Lname", "$Lname");
$resident_search->AddDBParam("fname", "$fname");
$resident_search->AddDBParam("year_grad", "$year_grad");
$resident_search->AddDBParam("state", "$state");
$resident_search->AddDBParam("restype", "$restype");
$resident_search->AddSortParam("year_grad", "ascend");

if (isset($_GET['skip'])) {
    $currentSkip = $_GET['skip']; 
} else {
    $currentSkip = 0;
} 

$resident_search->FMSkipRecords($currentSkip);

$search_results = $resident_search->FMFind();

?>

The code at the bottom of the page looks like this:


<?php
if (strlen($search_results['linkNext']) <1) {
echo "";
		
}else{
		
?>
		
<a href="<?php echo $search_results['linkNext'] ?>"><b>Next
Results</b></a> <img src="images/stpl_arr.gif" border="0"
align="middle">
		
<?php
}
?>

This code works fine with FMFindAll(),  however, on the FMFind(); the
LinkNext button returns no results instead of the next 25 records.  

I've tried other variations posted to the list for the isset statement
with the same results.  What I'm I doing wrong?

Thanks in advance for you help.

--Kim



Kim David Hawksworth, R.Ph., Web Manager
The Ohio State University Medical Center
Department of Pharmacy


More information about the FX.php_List mailing list