[FX.php List] Re: Mysterious asterisks appearing in fields

Chris Hansen chris at iViking.org
Wed Mar 7 10:45:10 MST 2007


Chris,

Have you tried echoing out the data from the form on which you post  
the data to FileMaker?  Do you know where the error is introduced  
(i.e. does PHP think the asterisks are there, too)?  I'd be  
interested to know what PHP actually thinks is in that variable at  
various places along the way.  Sometimes, when I'm doing highly  
targeted output of these sorts of things I also like to enclose the  
data being output in pipe characters or something.  Basically, some  
way to ensure that I'm also aware of any leading or trailing  
invisible characters.  Best,

--Chris Hansen
   FileMaker 8 Certified Developer
   FileMaker 7 Certified Developer
   Creator of FX.php
   "The best way from FileMaker to the Web."
   www.iViking.org


On Mar 7, 2007, at 9:22 AM, Chris Bisgard wrote:

> Dale,
>
> I didn't know it needed to be UTF-8, thanks! I changed it and will use
> that from now on.
>
> However, that didn't fix the problem. I'm still stumped.
>
> Chris
>
>
>> From: Dale Bengston <dbengston at preservationstudio.com>
>> Subject: Re: [FX.php List] Mysterious asterisks appearing in fields
>> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
>> Message-ID:
>> 	<C14A9B43-CDD8-47B3-8D93-F0D4BEE07529 at preservationstudio.com>
>> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>>
>> Hi Chris,
>>
>> Are you by any chance specifying something besides UTF-8 for
>> the character set on your web page that contains the form?
>> For FMSA 7/8, it should be specified like this:
>> <meta http-equiv="content-type" content="text/html; charset=UTF-8">
>>
>> Hope this helps,
>> Dale
>>
>> On Mar 5, 2007, at 8:24 PM, Chris Bisgard wrote:
>>
>>> 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
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>



More information about the FX.php_List mailing list