예제 #1
0
    $messageType = 'Fuzzy';
} else {
    $messageType = 'FX.php';
}
if (isset($_POST['find_records'])) {
    // a search is only preformed if the form was submitted
    // by placing the form values in an array, we can set all values for our search with a single function call
    $searchRecordsArray = array('First_Namer' => $_POST['fname'], 'Last_Name' => $_POST['lname'], 'Phone_1 ' => $_POST['phone']);
    // configure a connection to FileMaker Server Advanced
    $contactsListQuery = new FX($serverIP, $webCompanionPort, $dataSourceType);
    // set database and layout information
    $contactsListQuery->SetDBData('Contacts.fp7', 'web_list');
    // set database username and password
    $contactsListQuery->SetDBUserPass($webUN, $webPW);
    // add parameter array for new record
    $contactsListQuery->AddDBParamArray($searchRecordsArray);
    // create a new record
    $contactsList = $contactsListQuery->DoFXAction('perform_find');
} else {
    // otherwise, find all records
    // configure a connection to FileMaker Server Advanced
    $contactsListQuery = new FX($serverIP, $webCompanionPort, $dataSourceType);
    // set database and layout information
    $contactsListQuery->SetDBData('Contacts.fp7', 'web_list', 'all');
    // set database username and password
    $contactsListQuery->SetDBUserPass($webUN, $webPW);
    // retrieve all records in this database available to the current user
    $contactsList = $contactsListQuery->DoFXAction('show_all');
}
?>
<html>