CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2005
    Posts
    73

    Preserve format of data send through textarea

    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:
    Code:
    MKKTAIAIAVALAGFATVAQAAPKDNTWYTGAKLGWSQYHDTGFINNNGPTHENQLGAGA
    
    
    FGGYQVNPYVGFEMGYDWLGRMPYKGSVENGAYKAQGVQLTAKLGYPITDDLDIYTRLGG
    
    
    MVWRADTKSNVYGKNHDTGVSPVFAGGVEYAITPEIATRLEYQWTNNIGDAHTIGTRPDN
    
    
    GMLSLGVSYRFGQGEAAPVVAPAPAPAPEVQTKHFTLKSDVLFNFNKATLKPEGQAALDQ
    
    
    LYSQLSNLDPKDGSVVVLGYTDRIGSDAYNQGLSERRAQSVVDYLISKGIPADKISARGM
    
    
    GESNPVTGNTCDNVKQRAALIDCLAPDRRVEIEVKGIKDVVTQPQA
    instead of
    Code:
    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

  2. #2
    Join Date
    Aug 2002
    Location
    Brazil
    Posts
    730

    Smile Re: Preserve format of data send through textarea

    Maybe the problem is when you output it to the browser. Maybe something is filtering it somewhere.

    Maybe the text is coming correctly. is it a <textarea> or a rich text editor like tinymce/fckeditor?

    Try doing this in the first lines is the page that receives the POST data:

    Code:
    <?php
    echo '<pre>';
    var_dump();
    echo '</pre>';
    exit;
    ?>
    That should show how text is coming.
    All consequences are eternal in some way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured