[FX.php List] Noob needs help with edit record

Larry Schultz larry at macedge.net
Sun Dec 30 12:06:03 MST 2007


Hi folks, I've gotten to a point where I'm reaching out for help  
after spending 2 days and nights trying to understand how to do an  
edit. All thoughts, suggestions, and help is appreciated.


I've got a scripted email in FM that sends a dynamic link in the  
email. The link is formed like this:

http://71.159.221.216/localtest/PeritusMonSite/trans_eval.php? 
var1=5475&var2=1169&var3=44444&Var4=1778&var5=Larry


var1 is the important variable here, as it is the record ID for the  
record in need of editing.  This record ID field is "RecordID" in the  
db.

I have no problem writing the code to add a record with fx.php, but  
writing the code for an edit is not working for me. I have no idea  
where to look to fix this, hence this post.

Here's the code, minus the html for the results page. It has a static  
value for the record I'd like to edit, until I can make this work.

<?php require_once('../Connections/PeritusFX.php'); ?>
<?php
$edit_result_edit = clone($PeritusFX);
$edit_result_edit->layout = 'TranslatorEvaluationForWeb';
$edit_result_edit->AddDBParam('RecordID', '5475');
$edit_result_fields = array(

'Comments_Accuracy'=>$_POST['Comments_Accuracy'],
'Comments_Completeness[]'=>$_POST['Comments_Completeness'],
'Comments_Spelling'=>$_POST['Comments_Spelling'],
'Comments_Grammer'=>$_POST['Comments_Grammer'],
'Comments_Punctuation'=>$_POST['Comments_Punctuation'],
'Comments_Hyphenation'=>$_POST['Comments_Hyphenation'],
'Comments_Terminology'=>$_POST['Comments_Terminology'],
'Comments_Style'=>$_POST['Comments_Style'],
'Comments_DNLF'=>$_POST['Comments_DNLF'],
'Comments_TCnPD'=>$_POST['Comments_TCnPD'],
'Comments_TypeStyle'=>$_POST['Comments_TypeStyle'],
'Comments_PosIllistrattions'=>$_POST['Comments_PosIllistrattions'],
'Comments_GraphicsErrors'=>$_POST['Comments_GraphicsErrors'],
'Comments_Formatting'=>$_POST['Comments_Formatting'],
'Comments_OnTime'=>$_POST['Comments_OnTime'],
'Comments_WithinBudget'=>$_POST['Comments_WithinBudget'],
'Comments_Responsiveness'=>$_POST['Comments_Responsiveness'],
'Comments_OpenFeedback'=>$_POST['Comments_OpenFeedback'],
'Comments_Communicate'=>$_POST['Comments_Communicate'],
'Comments_OverallNature'=>$_POST['Comments_OverallNature'],

;
foreach($edit_result_fields as $key=>$value) {
     $edit_result_edit->AddDBParam($key,$value);
}

$edit_result_result = $edit_result_edit->FMEdit();

if(is_a($edit_result_result,"FX_Error") || $edit_result_result 
['errorCode'] != "0") fmsTrapError($edit_result_result,"error.php");

$edit_result_row = current($edit_result_result['data']);
$edit_result_row_key = key($edit_result_result['data']);
// FMStudioFX v1.0 - do not remove comment, needed for DreamWeaver  
support ?>


More information about the FX.php_List mailing list