[FX.php List] Re: [OffTopic] Executing php script from FileMaker, how to get result back in to FileMaker GUI?

Gjermund Gusland Thorsen ggt667 at gmail.com
Wed Oct 15 05:18:05 MDT 2008


Well using it in a set field makes it put the output from webserver
inside a field correctly...

here is the script I use for making the Filemaker admin set the
webuser's password.
---
<?php
include_once($_SERVER['DOCUMENT_ROOT'] . "/FX/FX.php");
include_once($_SERVER['DOCUMENT_ROOT'] . "/FX/server_data_kf.php");

$q = new FX( $serverIP, $webCompanionPort, $dataSourceType);
$q->SetDBData( 'DBName', 'User' );
$q->SetDBUserPass( $webUN, $webPW );
$q->AddDBParam( '-recid', $_GET['id'] );
$r = $q->FMFind();

$q = new FX( $serverIP, $webCompanionPort, $dataSourceType);
$q->SetDBData( 'DBName', 'User' );
$q->SetDBUserPass( $webUN, $webPW );
$q->AddDBParam( '-recid', $_GET['id'] );
$q->AddDBParam( 'userValid', sha1(
$r['data'][key($r['data'])]['userName'][0] . '/' . $projectKey . '/' .
$r['data'][key($r['data'])]['userPassword'][0] ) );
$r2 = $q->FMEdit();

if( intval( $r['errorCode'] ) == 0 && intval( $r2['errorCode'] ) == 0 ) {
        echo 'OK';
} else {
        echo 'Failed';
}
?>
---
ggt

2008/10/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
> I tried this: GetLayoutObjectAttribute ( "PassordViaWeb"; "content" )
> only response is: ?
>
> ggt
>
> 2008/10/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>> I must admint that I have seen this and that it looks quiet promising.
>>
>> http://lists.apple.com/archives/applescript-users/2006/Jul/msg00396.html
>>
>> ggt
>>
>> 2008/10/15 Gjermund Gusland Thorsen <ggt667 at gmail.com>:
>>> Here is the tail -n 6 of my php script:
>>>
>>> if( intval( $r['errorCode'] ) == 0 && intval( $r2['errorCode'] ) == 0 ) {
>>>        echo 'OK';
>>> } else {
>>>        echo 'Failed';
>>> }
>>> ?>
>>>
>>> So when I put the URI with the current RecorID into the WebViewer, I
>>> see OK or Failed,
>>> but how do I scoop those up? I would expect the to be a Get() function for this?
>>>
>>> ggt667
>>>
>>
>


More information about the FX.php_List mailing list