accordingly $record = null; ?> <?php if (array_key_exists('recid', $_GET)) { // 'recid' parameter was passed in, use it to grab record object // Create a new connection to FMPHP_Sample database. // Location of FileMaker Server is assumed to be on the same machine, // thus we assume hostspec is api default of 'http://localhost' as specified // in filemaker-api.php. // If FMSA web server is on another machine, specify 'hostspec' as follows: // $fm = new FileMaker('FMPHP_Sample', 'http://10.0.0.1'); $fm = new FileMaker('FMPHP_Sample'); // Since we're passed in recid via param (i.e. viewRecord.php?recid=n), use // FileMaker::getRecordById() to directly get record object with recid accessed // via $_GET[] array $record = $fm->getRecordById('Form View', $_GET['recid']); if (FileMaker::isError($record)) { echo "Error: {$result->getMessage()}\n"; exit; } echo "Editing " . $record->getField('Title'); } else { // no 'recid', so we're creating a new record ?> Create New Record <?php } ?>
America 24/7 Collection
Title
Author
Publisher
Cover Photo Credit
Number of Pages
Status
Quantity in Stock
Description