[FX.php List] How to modify textarea text for posting back to FM

William Akey wcakey at hotmail.com
Mon May 8 20:59:12 MDT 2006


Hey, Andy,

Yeah!!..That's the ticket. I could not remember the character code for the
line endings the are used inside FileMaker text fields. Now I know.
Hopefully this will help some other dumb grunts :-).

Thanks

William


----- Original Message ----- 
From: "Andy Gaunt" <andy at fmpug.com>
To: "'FX.php Discussion List'" <fx.php_list at mail.iviking.org>
Sent: Monday, May 08, 2006 6:20 PM
Subject: RE: [FX.php List] How to modify textarea text for posting back to
FM


> William,
>
> On your fields in question, you can use
>
>
str_replace(chr(10),'',strip_tags(stripslashes(trim($_POST['Fieldvalue']))))
> ;
>
> This will remove the square 'chr(10)' and strip_tags, slashes and trim the
> field for good measure.
>
> A good idea to do this on a new variable and then use that variable to
edit
> the record with.
>
> The str_replace(chr(10),'',YOUR POSTED FIELD HERE); is what should get rid
> of your squares.
>
>
> HTH
>
> Andy Gaunt
> T: 407.810.4722
> andy at fmpug.com
> http://www.fmpug.com
>
> Recipient of FileMaker's 2005 "Mad Dog" Public Relations Award
>
> For chapter locations, dates & times please visit the website at
> http://www.fmpug.com If you can make it to a meeting, please RSVP at
> http://www.fmpug.com/rsvp.php
>
> -----Original Message-----
> From: fx.php_list-bounces at mail.iviking.org
> [mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of William Akey
> Sent: Monday, May 08, 2006 8:38 PM
> To: FX.php Discussion List
> Subject: Re: [FX.php List] How to modify textarea text for posting back to
> FM
>
> Hi Dale,
>
> Thanks.  I will check out the link you indicated. I already knew about
the
> use of stripslashes(), nl2br() and other functions for the  purpose of
> properly displaying text on a web page that has been drawn from a
FileMaker
> database.
>
> What I am asking about is the less discussed reverse process: i.e, how to
> correctly modify multi-paragraph text that has been displayed in a
textarea
> element on a web page and modified by an end user so that, when it is
posted
> back to the database via an FMEdit() command, it will end up in the proper
> format in the database. Hopefully that is more clear.
>
> Thanks again for your help.
>
> William
>
>
> ----- Original Message ----- 
> From: "Dale Bengston" <dbengston at preservationstudio.com>
> To: "FX.php Discussion List" <fx.php_list at mail.iviking.org>
> Sent: Monday, May 08, 2006 4:15 PM
> Subject: Re: [FX.php List] How to modify textarea text for posting back to
> FM
>
>
> > Hi WIlliam,
> >
> > stripslashes() can help, and nl2br() will properly format the
> > paragraphs. You can find these and all sorts of string-manipulation
> > magic at
> >
> > <http://us2.php.net/manual/en/ref.strings.php>
> >
> > Hope this helps,
> > Dale Bengston
> >
> > On May 8, 2006, at 4:38 PM, William Akey wrote:
> >
> > > Hi,
> > >
> > > Apologies if this has come up numerous times before. I need to know
> > > how to properly condition textarea text contaning multiple
> > > "pagagraphs" that has been displayed and edited on a web page,
> > > before it is posted back into the FileMaker database so that I
> > > avoid getting the little square boxes showing up in the FileMaker
> > > text fields.
> > >
> > > Thanks in advance for any help you can offer.
> > >
> > > William
> > > _______________________________________________
> > > 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