[FX.php List] Checking POST data for content.

Rob H. Christensen robhelleshoj at tiscali.dk
Tue Mar 14 13:04:48 MST 2006


I have a page, which function is both to display the data from the database,
and to allow to edit those data. I have a php scripts which field by field
compares the "old" data in the  fields in the database with the "old" or
"new" data in the POST array, before the data is made into an AddDBParam in
the edit script. Also a variable is set for logging, if the data has
changed. 
Both parts are equally important.
Because of the language (Danish) there are some problems in doing this. It
seems that FileMaker and PHP each have their own and different definitions
for some of the characters, which in HTML are escaped as "æ",
"ø# and "å" OR "&#230", "&#248" qnd "&#229" and likewise for
the Uppercase characters.
This results in the script deciding there is a difference between the "old"
data in the database and the "old" data in the POST array, thus creating a
log entry for the unchanged data.

The script part which decides this is as:

if($findJobData['Deadline'][0]!==$_POST['Deadline'])
{
                   
$editJob->AddDBParam('Deadline', $_POST['Deadline']);
                   
$Deadline_log="Deadline: " . $_POST["Deadline"] . ". ";
}


$Deadline_log is made part of a later $LOGNEW

($LOGNEW=$LOGOLD . [some other variables] . "\n" . $Date . ": New Deadline"
. $Deadline_log; ) 

My question is: Is there an easier way to compare these "old" and "new"
entries in the form, which does not conflict with the differences in
expressing these odd characters?  Part of these entries are selected values
in pop-up lists, part are text fields.  The only text unaffected seems to be
the text in a textarea. The pages are used on Mac and PC, which also have
different opinions about representing certain non standard characters.

Filemaker 6 Unlimited on Mac OS 10.3.8 with Apache 1.3.33 and PHP 4.3.10,
using FX 3.1.

Rob




More information about the FX.php_List mailing list