[FX.php List] Mysterious asterisks appearing in fields

Chris Bisgard cbisgard at racc.org
Mon Mar 5 19:24:40 MST 2007


Hi all,

I've been using FX.php and FileMaker 7/8 for the past two years for
simple "search and display results" websites, and I'm now building my
very first solution that will allow data entry via the web. It's a very
straightforward "survey" type database, where a guest fills out a
one-page form of questions and hits submit, entering the data into a new
record in FileMaker. No logins/passwords, sessions or anything fancy
here.

I've got it working so that I can enter data, but anything I enter gets
asterisks prepended and appended to it. So, for example, if I were to
enter "Bob Smith" (no quotes) in my form field, when it gets into the
database, the field contains "*Bob Smith*" (again, no quotes, but the
asterisks are there). This looks almost like some kind of intended
behavior by FileMaker, like it's trying to tell me that the data was
entered in an unexpected way. 

I'm afraid I'm missing something obvious here. Does anyone know what
this is?

I'll paste the code below, though I think it's pretty straightforward.
I'm only including two fields for now in order to keep this simple. Note
that I'm using 'trim()' to clean up the POST data, but this is not
what's causing the problem. It happens without 'trim()' as well.

<!-- Here's the HTML form: -->

<form id="clp" name="clp" method="post" action="submit.php">
Name of Organization: <input name="OrgName" type="text" id="OrgName"
size="20" maxlength="255" /><br>
Name of Contact: <input name="OrgContact" type="text" id="OrgContact"
size="20" maxlength="255" /><br>
<input type="submit" name="Submit" value="Submit" />
</form>


<!-- And here's the PHP script: -->

<?php

include_once("/inetpub/wwwroot/FX/FX.php");
include_once("/inetpub/wwwroot/FX/server_data.php");
include_once("/inetpub/wwwroot/FX/FMErrors.php");

$OrgName=trim($_POST['OrgName'],"*");
$OrgContact=trim($_POST['OrgContact'],"*");

$query=new FX($serverIP,$webCompanionPort); 
$query->setDBData('CLP','Web');
$query->AddDBParam('OrgName',$OrgName);
$query->AddDBParam('OrgContact',$OrgContact);

$addRecord=$query->FMNew();

?>

<!-- END -->

Thanks for any help.

Chris Bisgard


More information about the FX.php_List mailing list