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

Joel Shapiro jsfmp at earthlink.net
Wed Oct 15 15:58:39 MDT 2008


Hey ggt

Do you mean that you can use GetLayoutObjectAttribute  
( "PassordViaWeb"; "content" ) to get "OK" or "Failed" into a field  
by using SetField in FMP?

-Joel


On Oct 15, 2008, at 4:18 AM, Gjermund Gusland Thorsen wrote:

> 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
>>>>
>>>
>>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list