[FX.php List] Using Text Area to put data into FM

Andy Gaunt andy at fmpug.com
Sat Aug 5 16:47:41 MDT 2006


Ed,

Wrap your echo'd text in nl2br();

Eg: nl2br($value['YourField'][0]);

This will convert the new line characters to break characters.

Andy Gaunt
Office: 321.206.3658
Mobile: 407.810.4722
andy at fmpug.com
http://www.fmpug.com    

Going to DevCon 2006? Swing by our booth and pet the Pug!

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 Edward L. Ford
Sent: Saturday, August 05, 2006 5:25 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] Using Text Area to put data into FM

Yup, that did it.  Sadly, I stared at it for several hours trying to see 
why it didn't work, but I never noticed I forgot the comma.  Duh!

Next problem with the textarea is as follows:
Let's say someone inputs the following 5 lines into a textarea:
Line 1
Line 2
Line 3
Line 4
Line 5

They show up in the FM database like that just fine.  However, when I 
fetch them out of the database again, they come out with no line breaks:
Line 1 Line 2 Line 3 Line 4 Line 5

How can I fix this so that the line breaks export correctly?  The XML 
code shows thats how they come out (i.e., there aren't any PHP 
manipulations affecting the output).

--Ed

Dale Bengston wrote:
> Hi Ed,
>
> How about adding a comma between the parameters?
>
> $NewRecord->AddDBParam('MoreInfo', $_POST['more_info']);
>
> Dale
>
> On Aug 3, 2006, at 2:39 PM, Edward L. Ford wrote:
>
>> Hi,
>> I have a HTML which includes a textarea field for a long 
>> description.  When the form is submitted, PHP gives back the error 
>> *"Parse error*: parse error, unexpected T_VARIABLE in <server/file 
>> path> **on line *21*.
>> If I comment out the PHP line which reads 
>> "$NewRecord->AddDBParam('MoreInfo' $_POST['more_info']);"
>> submission goes into the FM database just fine.
>>
>> Can anyone provide suggestions about how I get this textarea field 
>> into the database?
>>
>> Thanks,
>> --Ed Ford
>> _______________________________________________
>> 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