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

Chris Bisgard cbisgard at racc.org
Wed Mar 14 13:30:26 MDT 2007


Andrew,

Ah! Thanks, this makes sense... Will turning off 'magic quotes' in
php.ini have negative effects in terms of what comes back from FileMaker
on a search/display to the web?

Unfortunately, I am now no further in solving the asterisk problem. 

Chris

> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org 
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of 
> Andrew Denman
> Sent: Wednesday, March 14, 2007 12:27 PM
> To: 'FX.php Discussion List'
> Subject: RE: [FX.php List] Re: Re: Mysterious asterisks 
> appearing in fields
> 
> Addendum: if you control your PHP install, you could also 
> turn 'magic quotes' off in php.ini.
> 
> Andrew Denman
> 
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of 
> Andrew Denman
> Sent: Wednesday, March 14, 2007 2:25 PM
> To: 'FX.php Discussion List'
> Subject: RE: [FX.php List] Re: Re: Mysterious asterisks 
> appearing in fields
> 
> The default PHP install has the 'magic quotes' setting turned 
> on (in php.ini), which will automatically escape ", ', and \ 
> characters.  Since Filemaker doesn't require these fields to 
> be escaped to write to the database, you will get \", \' and 
> \\ written to your database unless you use stripslashes().
> 
> http://us3.php.net/manual/en/function.stripslashes.php
> 
> Andrew Denman
> 
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of 
> Chris Bisgard
> Sent: Wednesday, March 14, 2007 2:17 PM
> To: FX.php Discussion List
> Subject: RE: [FX.php List] Re: Re: Mysterious asterisks 
> appearing in fields
> 
> Dale,
> 
> I understand that code coming BACK from FMP gets the quotes 
> escaped, I just don't quite get why the data going INTO FMP 
> is getting escaped quotes. This means, if I understand you 
> correctly, that I need to enclose all strings of data going 
> from the web INTO my FMP databases in stripslashes(), like this:
> 
>   $q->AddDBParam( 'OrgName', stripslashes($OrgName) ); 
> 
> Is that correct? This is the first I've heard this, but I am 
> new to using FX.php to enter data (been using it only to 
> search and display before this). 
> 
> Chris
> 
> > -----Original Message-----
> > From: fx.php_list-bounces at mail.iviking.org
> > [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Dale 
> > Bengston
> > Sent: Wednesday, March 14, 2007 12:11 PM
> > To: FX.php Discussion List
> > Subject: Re: [FX.php List] Re: Re: Mysterious asterisks 
> appearing in 
> > fields
> > 
> > Chris,
> > 
> > Yes, that is expected. It's actually a good thing, because 
> un-escaped 
> > single and double quotes could cause havoc with your code 
> coming back 
> > in from FMP.
> > 
> > My two best friends for formatting strings from FMP are stripslashes
> > () and nl2br(). Often used in conjunction!
> > 
> > Dale
> > 
> > On Mar 14, 2007, at 2:02 PM, Chris Bisgard wrote:
> > 
> > > Dale, just to be clear, the slashes are also appearing in the 
> > > FileMaker database, not just when displaying data back to
> > the web. Is
> > > that expected?
> > >
> > > Chris
> > >
> > >> Darn, that's expected behavior, and not a clue to the asterisks.
> > >> You'll need to use stripslashes() to address display of 
> such data 
> > >> back to the web.
> > >>
> > >> http://us2.php.net/manual/en/function.stripslashes.php
> > >>
> > >> Dale
> > >>
> > >> On Mar 12, 2007, at 8:39 PM, Chris Bisgard wrote:
> > >>
> > >>> A possible clue... if I enter single or double quotes 
> in a field,
> > > each
> > >>> one ends up with a backslash in front of it in the data. 
> > Looks like
> > > an
> > >>> escape character. Page encoding to blame?
> > >>>
> > >>> Chris
> > >
> > >
> > >
> > > _______________________________________________
> > > FX.php_List mailing list
> > > FX.php_List at mail.iviking.org
> > > http://www.iviking.org/mailman/listinfo/fx.php_list
> > 
> > _______________________________________________
> > FX.php_List mailing list
> > FX.php_List at mail.iviking.org
> > http://www.iviking.org/mailman/listinfo/fx.php_list
> > 
> > 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> 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