AnsweredAssumed Answered

PHP create record

Question asked by Tom_Droz on Dec 27, 2013
Latest reply on Dec 30, 2013 by Tom_Droz

Hi all

 

I use dreamweaver with FM plug in. I have used this exact script before with no problems. I am now trying it on a differnt database all FM12. The PHP script correctly creates a new record. However when I look for the record it doesnt show. If I close the database and reopen it it is there. Why is the record not committing? Any ideas.

 

thanks

Tom

 

Script:

 

<?php require_once('Connections/Faith.php'); ?>
<?php
$FormAction_add = $Faith->newAddCommand('Temp_Web_Showings');
$FormAction_fields = array
('Buyer_Interest'=>$_REQUEST['Buyer_Interest'],
'Property_Show'=>$_REQUEST['Property_Show'],
'Price_Opinion'=>$_REQUEST['Price_Opinion'],
'Optimum_Price'=>$_REQUEST['Optimum_Price'],
'Purchase_Decision'=>$_REQUEST['Purchase_Decision'],
'Comments'=>$_REQUEST['Comments'],
'ID'=>$_REQUEST['ID'] );

 

foreach($FormAction_fields as $key=>$value) {
$FormAction_add->setField($key,$value);
}
$FormAction_add->SetScript('Temp_Show','');

$FormAction_result = $FormAction_add->execute();

if(FileMaker::isError($FormAction_result)) fmsTrapError($FormAction_result,"error.php");

$FormAction_row = current($FormAction_result->getRecords());
// FMStudio v1.0 - do not remove comment, needed for DreamWeaver support ?>

Outcomes