[FX.php List] Problem with FMEdit
Gjermund Gusland Thorsen
ggt667 at gmail.com
Sun Oct 17 02:58:57 MDT 2004
I realize that my previous post does not answer your question,
please check authentication, does the username/password match the
database worked on?
ggt
On Thu, 14 Oct 2004 12:13:45 -0400, Marisa Smith
<marisa at datasmithconsulting.net> wrote:
> Hi All-
>
> I'm new to FX.PHP, and an "intermediate" user of PhP, so forgive me if
> this is a newbie question/problem.
>
> I'm trying to write a generic function that loops through the POST
> variable submitted on a form, adds the DB parameters and then submits an
> FMEdit request. I'm encountering a problem where the information is
> being double-entered into the database. In other words, if I change
> the firstname field to Judy, the data that ends up in the field is
> JudyJudy.
>
> I have tried to debug this myself by printing out the arrays, but I
> can't figure out what I'm doing wrong. The problem appears to be when I
> pass the array to FMEdit(), because that's there everything "goes
> wrong". What is strange is that if I cut and paste the XML URL
> generated, it works fine. Could there be a bug with the FMEdit
> function?
>
> Any help would be greatly appreciated.
>
> BTW - I'm using FMSA7 on Mac OS 10.3.5
>
> Thank you.
>
> ****Here is the code snippet I am using.****
>
> $AAHRPPDocEdit = new FX($serverIP, $webCompanionPort);
> $AAHRPPDocEdit->SetDBData("orcr_aahrpp.fp7", "documents");
>
> print "<br>HERE ARE THE VARIABLES FROM THE POST:<br>";
> $post=$HTTP_POST_VARS;
>
> print_r($post);
> print "<br>HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM</br>";
> foreach ($post as $key => $value) {
>
> $AAHRPPDocEdit->AddDBParam($key,$value);
> print "<br>$key=$value<br>";
>
> }
>
> print "<br>HERE IS THE ARRAY PASSED TO THE FMEdit function :<br>";
> print_r($AAHRPPDocEdit);
>
> $return = $AAHRPPDocEdit->FMEdit();
>
> print "<br>HERE IS THE ARRAY RETURNED FROM THE EDIT:<br>";
> print_r($return);
>
> ****And here is what is being returned ****
>
> HERE ARE THE VARIABLES FROM THE POST:
> Array ( [-recid] => 3 [documentid] => 3 [contacts::first_name] =>
> Judith [contacts::last_name] => Birk [doc_name] => irb_manual.pdf
> [doc_description] => My Description 3 [doc_type] => PDF )
> HERE I AM BUILDING THE ARRAY WITH ADDDBPARAM
>
> -recid=3
>
> documentid=3
>
> contacts::first_name=Judith
>
> contacts::last_name=Birk
>
> doc_name=irb_manual.pdf
>
> doc_description=My Description 3
>
> doc_type=PDF
>
> HERE IS THE ARRAY PASSED TO THE FMEdit function :
> fx Object ( [dataServer] => 192.168.0.2 [dataServerType] => FMPro7
> [dataPort] => 80 [dataPortSuffix] => :80 [database] => orcr_aahrpp.fp7
> [layout] => documents [responseLayout] => [groupSize] => 50
> [currentSkip] => 0 [defaultOperator] => bw [dataParams] => Array (
> [0] => Array ( [name] => -recid [value] => 3 [op] => ) [1] => Array
> ( [name] => documentid [value] => 3 [op] => ) [2] => Array (
> [name] => contacts::first_name [value] => Judith [op] => ) [3] =>
> Array ( [name] => contacts::last_name [value] => Birk [op] => ) [4]
> => Array ( [name] => doc_name [value] => irb_manual.pdf [op] => )
> [5] => Array ( [name] => doc_description [value] => My Description 3
> [op] => ) [6] => Array ( [name] => doc_type [value] => PDF [op] =>
> ) ) [sortParams] => Array ( ) [primaryKeyField] =>
> [modifyDateField] => [dataKeySeparator] => [fuzzyKeyLogic] =>
> [genericKeys] => [fieldInfo] => Array ( ) [currentData] => Array (
> ) [valueLists] => Array ( ) [totalRecordCount] => -1 [foundCount] =>
> -1 [dateFormat] => [timeFormat] => [dataURL] => [dataURLParams] =>
> [dataQuery] => [currentFlag] => [currentRecord] => [currentField] =>
> [currentValueList] => [fieldCount] => 0 [columnCount] => -1 [fxError]
> => No Action Taken [errorTracking] => 0 [DBUser] => Admin
> [DBPassword] => YkkYbs! [userPass] => [isPostQuery] => 1 [useCURL] =>
> 1 [invalidXMLChars] => Array ( [0] => [1] =>
> [2] => ) [UTF8SpecialChars] => Array ( [0] => |([-])([ˇ-])|e
> [1] => |()([ -])([ˇ-])|e [2] => |([-])([ˇ-])([ˇ-])|e [3] =>
> |()([-])([ˇ-])([ˇ-])|e [4] => |([-])([ˇ-])([ˇ-])([ˇ-])|e [5]
> => |()([ˇ-])([ˇ-])([ˇ-])|e ) [UTF8HTMLEntities] => Array ( [0] =>
> $this->BuildExtendedChar('\1','\2') [1] =>
> $this->BuildExtendedChar('\1','\2','\3') [2] =>
> $this->BuildExtendedChar('\1','\2','\3') [3] =>
> $this->BuildExtendedChar('\1','\2','\3','\4') [4] =>
> $this->BuildExtendedChar('\1','\2','\3','\4') [5] =>
> $this->BuildExtendedChar('\1','\2','\3','\4') ) )
> HERE IS THE ARRAY RETURNED FROM THE EDIT:
> Array ( [data] => Array ( [3.17] => Array ( [documentid] => Array
> ( [0] => 3 3 ) [unitid] => Array ( [0] => 1 ) [contactid] =>
> Array ( [0] => 1 ) [doc_type] => Array ( [0] => PDF PDF )
> [doc_description] => Array ( [0] => My Description 3 My Description 3
> ) [doc_name] => Array ( [0] => irb_manual.pdf irb_manual.pdf )
> [doc_name_new] => Array ( [0] => ) [upload_date] => Array ( [0] =>
> 10/09/2004 ) [mod_date] => Array ( [0] => 10/13/2004 )
> [create_date] => Array ( [0] => 10/11/2004 ) [create_contactid] =>
> Array ( [0] => 1 ) [mod_contactid] => Array ( [0] => 1 )
> [doc_comments] => Array ( [0] => Comments about this document )
> [doc_status] => Array ( [0] => Active ) [contacts::first_name] =>
> Array ( [0] => Judith Judith ) [contacts::last_name] => Array (
> [0] => Birk Birk ) [contacts::uniqname] => Array ( [0] => jbirk )
> ) ) [linkNext] => [linkPrevious] => [foundCount] => 1 [fields] =>
> Array ( [0] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] =>
> documentid [type] => NUMBER [extra] => ) [1] => Array ( [emptyok]
> => YES [maxrepeat] => 1 [name] => unitid [type] => NUMBER [extra] =>
> ) [2] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] =>
> contactid [type] => NUMBER [extra] => ) [3] => Array ( [emptyok] =>
> YES [maxrepeat] => 1 [name] => doc_type [type] => TEXT [extra] => )
> [4] => Array ( [emptyok] => YES [maxrepeat] => 1 [name] =>
> doc_description [type] => TEXT [extra] => ) [5] => Array (
> [emptyok] => YES [maxrepeat] => 1 [name] => doc_name [type] => TEXT
> [extra] => ) [6] => Array ( [emptyok] => YES [maxrepeat] => 1
> [name] => doc_name_new [type] => TEXT [extra] => ) [7] => Array (
> [emptyok] => YES [maxrepeat] => 1 [name] => upload_date [type] => DATE
> [extra] => ) [8] => Array ( [emptyok] => YES [maxrepeat] => 1
> [name] => mod_date [type] => DATE [extra] => ) [9] => Array (
> [emptyok] => YES [maxrepeat] => 1 [name] => create_date [type] =>
> DATE [extra] => ) [10] => Array ( [emptyok] => YES [maxrepeat] => 1
> [name] => create_contactid [type] => NUMBER [extra] => ) [11] => Array
> ( [emptyok] => YES [maxrepeat] => 1 [name] => mod_contactid [type]
> => NUMBER [extra] => ) [12] => Array ( [emptyok] => YES [maxrepeat]
> => 1 [name] => doc_comments [type] => TEXT [extra] => ) [13] =>
> Array ( [emptyok] => YES [maxrepeat] => 1 [name] => doc_status
> [type] => TEXT [extra] => ) [14] => Array ( [emptyok] => YES
> [maxrepeat] => 1 [name] => contacts::first_name [type] => TEXT
> [extra] => ) [15] => Array ( [emptyok] => YES [maxrepeat] => 1
> [name] => contacts::last_name [type] => TEXT [extra] => ) [16] =>
> Array ( [emptyok] => YES [maxrepeat] => 1 [name] =>
> contacts::uniqname [type] => TEXT [extra] => ) ) [URL] =>
> http://Admin:YkkYbs!@192.168.0.2:80/fmi/xml/FMPXMLRESULT.xml?-db=
> orcr_aahrpp.fp7&-lay=documents&-max=50&-recid=3&documentid=3&contacts::
> first_name=Judith&contacts::last_name=Birk&doc_name=irb_manual.pdf&
> doc_description=My+Description+3&doc_type=PDF&-edit [query] =>
> [errorCode] => 0 [valueLists] => Array ( ) )
>
> --
> Marisa Smith
> DataSmith Consulting, LLC
> 667 Kuehnle Street
> Ann Arbor, MI 48103
> PH/FAX: (734) 369-3001
> marisa at datasmithconsulting.net
> Database Design • Web Design • IT Solutions
>
> Associate Member, Filemaker Solutions Alliance
> _______________________________________________
> 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