[FX.php List] Setting a global field in IWP using FX.PHP

Lostpants lostpants at hotmail.com
Thu Apr 20 17:17:10 MDT 2006


I'm trying to use FX to set a global field in an IWP database. 
The 'SetFMGlobal' function doesn't seem to work, and I am not getting back
any errors back.
I have read that you have to include session information somewhere in order
to populate a global, but don't see any reference to session info in the
function reference.
 
Here is the page that tries to put, 'hello' into my gloabal field.
BTW: the commented line is an experiment to try the adddbparam function. It
too didn't work.
 
<html>
<head>
<title>Updating a variable using fxPHP</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<p>This script attemtps to update a global variable in FMPro8 Server
Advanced using<br>
the AddDBParam, SetFMGlobal and FMFind method from fxPHP.</p>
<?
require_once($_SERVER['DOCUMENT_ROOT']."/FX/FX.php");
require_once($_SERVER['DOCUMENT_ROOT']."/FX/FX_Error.php");
require_once($_SERVER['DOCUMENT_ROOT']."/FX/server_data.php");
require_once($_SERVER['DOCUMENT_ROOT']."/FX/FX_constants.php");
$myQuery=new FX('144.25.180.191',80,'FMPro7');
$myQuery->SetDBData('PMRT.fp7','Login');
$myQuery->SetDBPassword('Guest','');
//$myQuery->AddDBParam('-recid',$id);
$myQuery->AddDBParam('gLogin_email','hello');
$myQuery->SetFMGlobal('gLogin_email','hello');
$myQueryResult=$myQuery->FMFind();

if($myQueryResult['errorCode']==0){
echo "Database update check: GOOD<br>";
echo "<script>window.opener.location.reload()</script>";
}else{
echo "<font color=\"red\">Database update check: BAD</font><br>";
echo $myQueryResult['errorCode'];
}
?>
</body>
</html>


More information about the FX.php_List mailing list