Forum Moderators: coopster

Message Too Old, No Replies

Preserve format of data send through textarea

         

ktsirig

9:43 pm on Sep 13, 2009 (gmt 0)

10+ Year Member



Hello,
I need to know if there is a way of preserving the exact format of data that is send through a textarea. The data is send via $_POST variable from the submit page, and is written in a file. However, when I see the output file, I get:

MKKTAIAIAVALAGFATVAQAAPKDNTWYTGAKLGWSQYHDTGFINNNGPTHENQLGAGA

FGGYQVNPYVGFEMGYDWLGRMPYKGSVENGAYKAQGVQLTAKLGYPITDDLDIYTRLGG

MVWRADTKSNVYGKNHDTGVSPVFAGGVEYAITPEIATRLEYQWTNNIGDAHTIGTRPDN

GMLSLGVSYRFGQGEAAPVVAPAPAPAPEVQTKHFTLKSDVLFNFNKATLKPEGQAALDQ

LYSQLSNLDPKDGSVVVLGYTDRIGSDAYNQGLSERRAQSVVDYLISKGIPADKISARGM

GESNPVTGNTCDNVKQRAALIDCLAPDRRVEIEVKGIKDVVTQPQA

instead of

MKKTAIAIAVALAGFATVAQAAPKDNTWYTGAKLGWSQYHDTGFINNNGPTHENQLGAGA
FGGYQVNPYVGFEMGYDWLGRMPYKGSVENGAYKAQGVQLTAKLGYPITDDLDIYTRLGG
MVWRADTKSNVYGKNHDTGVSPVFAGGVEYAITPEIATRLEYQWTNNIGDAHTIGTRPDN
GMLSLGVSYRFGQGEAAPVVAPAPAPAPEVQTKHFTLKSDVLFNFNKATLKPEGQAALDQ
LYSQLSNLDPKDGSVVVLGYTDRIGSDAYNQGLSERRAQSVVDYLISKGIPADKISARGM
GESNPVTGNTCDNVKQRAALIDCLAPDRRVEIEVKGIKDVVTQPQA

Should I add something in my php submit page in the textarea part or is it something I have to do with the data before I write it in the file?

Thank you

omoutop

11:04 am on Sep 14, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



seems like there is an extra line break when you read/print your content.
Is it possible that you save your data using nl2br()?
Or that you read them with nl2br()?
If yes, remove it and see how this goes