[FX.php List] Submitting line breaks into FM field?

Dale Bengston dbengston at preservationstudio.com
Wed Dec 12 20:16:20 MST 2007


Hi Kevin,

I use implode("\n", $log);

Dale

On Dec 12, 2007, at 9:00 PM, Kevin Futter wrote:

> Hi all,
>
> In my day-to-day FX & FM work, I do a lot of reading from databases,  
> but not
> a great deal of data submission, and what there is tends to be check  
> boxes,
> radio buttons and select menus.
>
> Today I find myself needing to submit a multi-line data set into a  
> field in
> FM, but it goes in without line breaks - basically one long string.  
> The data
> is stored in the script as an array, and I use something like the  
> following
> to get it into the database:
>
> $parsedLog = implode(chr(10), $log);
> ...
> $FMSubmit->AddDBParam("log", $parsedLog);
>
> However, either FileMaker or FX is stripping the line breaks out  
> before
> dumping the data into the field. They're definitely there, because  
> if I run
> this line:
>
> $parsedLog = str_replace(chr(10), " ! ", $parsedLog);
>
> I end up with exclamation marks in the field, though doubled-up for  
> some
> reason I can't fathom.
>
> A colleague has successfully imported data into FM from mySQL that  
> contained
> ASCII 10 for formatting purposes, so it's either a 'feature' in FX  
> or a
> limitation in FM's XML interface (or something else I'm not even  
> aware of).
>
> Can anybody offer any clues?
>
> (FWIW, I've got a temporary fix that runs a find/replace script in FM,
> replacing the string "<break>" with a pilcrow.)
>
> -- 
> Kevin Futter
> Webmaster, St. Bernard's College
> http://www.sbc.melb.catholic.edu.au/
>
>
>
> #####################################################################################
> This e-mail message has been scanned for Viruses and Content and  
> cleared
> by MailMarshal
> #####################################################################################
>
> This e-mail and any attachments may be confidential. You must not  
> disclose or use the information in this e-mail if you are not the  
> intended recipient. If you have received this e-mail in error,  
> please notify us immediately and delete the e-mail and all copies.  
> The College does not guarantee that this e-mail is virus or error  
> free.  The attached files are provided and may only be used on the  
> basis that the user assumes all responsibility for any loss, damage  
> or consequence resulting directly or indirectly from the use of the  
> attached files, whether caused by the negligence of the sender or  
> not. The content and opinions in this e-mail are not necessarily  
> those of the College.
>
> _______________________________________________
> 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