[FX.php List] Parsing problem?

Rodney Schmidt rodney at fmpro2go.com
Sun Aug 5 21:01:49 MDT 2007


Dear friends:

I am using a bit of code to return a search using FX.php findall. In one of
my calculations, the URL returned in the browser is different from the
actual code in the PHP request. I am sure that I am doing something dumb,
but if someone can give me a suggestion, it would be appreciated.

Thank you very much.

-- 
Rodney Schmidt

MAC OS 10.4.10
PHP 5.2.2
Apache 1.3
using FX.php
--------------
The PHP code below

<a href="query.php?skip=<? echo ($skipsize-$groupsize); ?>">

yields this URL in browsers and immediately returns to the first page of the
query instead of the previous page:

http://xxxxxxx/FX/query.php?skip=%3C?echo%20($skipsize-$groupsize);%20?%3E

The symbols < and > and " seem to be parsed incorrectly by PHP, or have I
missed something here?

(I am sure that I have made a dumb mistake . . .)

-------

The rest of the code is here:

<?php
include_once('FX.php');
include_once('server_data.php');

if(isset($_GET['skip'])){

$skipsize=$_GET['skip'];
}else{
$skipsize=0;
}
$groupsize=25;
$search = new FX($serverIP,$webCompanionPort);
$search -> SetDBData('Inquiry.fp7','records',$groupsize);
$search -> SetDBPassword($webPW,$webUN);
$search -> FMSkipRecords($skipsize);
$searchResult = $search -> FMFindall();

?>

<?php if($skipsize>0){ ?>
<a href="query.php?skip=0">First</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="query.php?skip=<? echo ($skipsize-$groupsize); ?>">Prev</a>
&nbsp;&nbsp;|&nbsp;&nbsp;
<?php } ?>

<?php
if($skipsize + $groupsize<$searchResult['foundCount']){
$pages = explode('.',($searchResult['foundCount']/$groupsize));
$pages_skip = $pages[0];
?>

<a href="query.php?skip=<?php echo ($skipsize + $groupsize);
?>">Next</a>&nbsp;&nbsp;|&nbsp;&nbsp;
<a href="query.php?skip=<?php echo $pages_skip * $groupsize;
?>">Last</a>
<?php } ?>






More information about the FX.php_List mailing list