homepage Welcome to WebmasterWorld Guest from 54.166.53.169
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Preserve format of data send through textarea
ktsirig

5+ Year Member



 
Msg#: 3988888 posted 9:43 pm on Sep 13, 2009 (gmt 0)

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

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 3988888 posted 11:04 am on Sep 14, 2009 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved