Jump to content

This topic is 7396 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Using FM7SA and FX.php. When I create a new record or edit data using FX.php, the data is written to FileMaker twice. For example, when I create a record for John Doe, FileMaker records each field as a multi-line text field:

First =

John

John

Last =

Doe

Doe

I'm sure the data is being passed to the php page properly. So why is it going to FileMaker twice? Has anyone else had this problem? What is the solution?

Thanks,

Dan

Posted

By the way, here is the code

<?php

$userEmail = $_POST[userEmail];

$password = $_POST[password];

$userLevel = $_POST[userLevel];

$reason = $_POST[reason];

$userRecID = $_POST[userRecID];

$userTitle = $_POST[userTitle];

$userFirst = $_POST[userFirst];

$userLast = $_POST[userLast];

$userSuffix = $_POST[userSuffix];

$userType = $_POST[userType];

$userPhoneExt = $_POST[userPhoneExt];

$userDirectDial = $_POST[userDirectDial];

$userDirectFax = $_POST[userDirectFax];

$userCell = $_POST[userCell];

$newUserEmail = $_POST[newUserEmail];

$newUserPassword = $_POST[userUserPassword];

# testing here to make sure that each variable contains what I'm expecting it to. It does...

echo "$userTitle <br>";

echo "$userFirst <br>";

echo "$userLast <br>";

echo "$userSuffix <br>";

echo "$userType <br>";

echo "$userPhoneExt <br>";

echo "$userDirectDial <br>";

echo "$userDirectFax <br>";

echo "$userCell <br>";

echo "$newUserEmail <br>";

echo "$newUserPassword <br><br><br>";

$editUserData = new FX($FMAddress, $FMPort);

$editUserData -> setDBUserPass('WebUser' , $FMPassword);

$editUserData -> setDBData('CabiNet.fp7' , 'WebUserInfo'); // params = (the database, the layout)

$editUserData -> AddDBParam('-recid' , $userRecID);

$editUserData -> AddDBParam('UserTitle' , $userTitle);

$editUserData -> AddDBParam('UserFirst' , $userFirst);

$editUserData -> AddDBParam('UserLast' , $userLast);

$editUserData -> AddDBParam('UserSuffix' , $userSuffix);

$editUserData -> AddDBParam('UserType' , $userType);

$editUserData -> AddDBParam('PhoneExtension' , $userPhoneExt);

$editUserData -> AddDBParam('UserDirectDial' , $userDirectDial);

$editUserData -> AddDBParam('UserDirectFax' , $userDirectFax);

$editUserData -> AddDBParam('UserCell' , $userCell);

$editUserData -> AddDBParam('UserEmail' , $newUserEmail);

$editUserData -> AddDBParam('Password' , $newUserPassword);

$editUserDataResult = $editUserData -> FMEdit();

echo "Thank you. Your data have been updated.";

if($debug=='yes'){

echo "<pre>nn";

print_r ($editUserDataResult);

echo "</pre>nn";

}

?>

Posted

Found out what the problem is. It turns out that FM7SA doesn't play well with the POST method. You can still use the post method for web forms, but you need to communicate with the server using GET.

In FX.php, lines 97 and 98, set the following to false:

var $isPostQuery = false;

var $useCURL = false;

After I did this, no problems. I reported the bug. We'll see if Server 7v3 gets it fixed.

Dan

This topic is 7396 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.