Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

$id = $_POST['familyid'];

$rec = $fm->getRecordById('Family', $id);

if (FileMaker::isError($rec)) {

echo "Error :" .$rec->getMessage()."</br>";

exit;

}

$rec->setField('address', $_POST['addr'] );

$rec->setField('city', $_POST['city'] );

$rec->setField('s_last_name', $_POST['fslastname'] );

$rec->setField('s_gender', $_POST['fsgender'] );

$rec->commit();

The above php code that im using to insert the records to filemaker db from php pages... but some time record not properly stored to filemaker db.. (i have not included the db connection code here)

please help me someone to solve this issue, or if possible share ur mind if you have any alternate idea.... or I need to do any changes with the above code.

Many thanks in advance

The FileMaker internal Record ID is not necessarily going to be the same as the id field you have created, so getRecordById may not work in this instance.

try


// find the correct record

$id = $_POST['familyid'];

$getrec = $fm->newFindCommand('family');

$getrec->addFindCriterion('ID', $id); //This should be your table's ID field

$found = $getrec->execute();

// get FileMaker's record ID

$rec = $found->getRecords();

$recid = $rec[0]->getRecordId();

// edit record

$change = newEditCommand('family', $recid);

$change->setField('address', $_POST['addr'] );

$change->setField('city', $_POST['city'] );

$change->setField('s_last_name', $_POST['fslastname'] );

$change->setField('s_gender', $_POST['fsgender'] );

$result = $change->execute();

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.