[FX.php List] Results of FMNew()
Charles Ross
chivalry at mac.com
Sat Dec 10 12:06:16 MST 2005
Andy,
Thanks, that worked perfectly. It's interesting trying to learn both
PHP and FX.php at the same time. :)
Chuck
On Dec 10, 2005, at 11:00 AM, andy at fmpug.com wrote:
> Chuck -
>
> Try adding a foreach statement after your FMNew to get the data out
> of the array
>
> foreach ($newResult['data'] as $key => $value)
> $newID = $value['LoginID'][0];
>
> <p>ID: <?php echo $newID; ?></p>
>
> Hope this helps
>
> Andy Gaunt
> andy at fmpug.com
> http://www.fmpug.com
>
>>
>> Here is a code snippet from a page that creates a new record:
>>
>> $newRecord = NewFX('WebLogins');
>> $newRecord->AddDBParam('EmailAddress', $EmailAddress);
>> $newRecord->AddDBParam('Password', $Password);
>> $newResult = $newRecord->FMNew();
>> $newEmailAddress = $newResult['EmailAddress'][0];
>> $newPassword = $newResult['Password'][0];
>> $newID = $newResult['LoginID'][0];
>>
>> When this page loads, FileMaker does contain the new record.
>> Shouldn't $newResult contain the data for that record? LoginID is the
>> auto-enter serial number key field for the table, and I want to
>> capture this for later use. But I have a line later in my file:
>>
>> <p>ID: <?php echo $newID; ?></p>
>>
>> No information is shown after the "ID:". It's simply blank. What am I
>> doing wrong?
>>
>> Thanks,
>> Chuck
>>
>>
>> _______________________________________________
>> FX.php_List mailing list
>> FX.php_List at mail.iviking.org
>> http://www.iviking.org/mailman/listinfo/fx.php_list
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
Chuck Ross
Author - The Book of AppleScript Studio
Contributor/Technical Editor - The Book of FileMaker
Contributing Editor - About This Particular Macintosh
Contributing Writer - ISO FileMaker Magazine
mailto:chivalry at mac.com
AIM:mer0dyn
web:http://homepage.mac.com/chivalry/
More information about the FX.php_List
mailing list