+ Reply to Thread
Results 1 to 4 of 4

Thread: Passing line breaks from <textarea>

  1. #1
    Barn Regular bryceowen is on a distinguished road bryceowen's Avatar
    Join Date
    Sep 2008
    Location
    Jacksonville, FL
    Posts
    93
    Rep Power
    4

    Passing line breaks from <textarea>

    Weird question here. I have a form that uses a textarea tag for the address line and I'm trying to pass that value as it is entered to another page. For example, say I enter into the textarea:
    Code:
    1234 Any St
    Unit 123
    
    Notice the line break after "St". Now, if I pass this value via post to my second page and echo it, it comes out as:
    Code:
    1234 Any St Unit 123
    
    However, if I print_r($_POST), it seems to remember the line break as such:
    Code:
    Array
    (
        [Address] => 1234 Any St
    Unit 123
    )
    
    How can I force the page to display the line break?

  2. #2
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


  3. #3
    Barn Regular bryceowen is on a distinguished road bryceowen's Avatar
    Join Date
    Sep 2008
    Location
    Jacksonville, FL
    Posts
    93
    Rep Power
    4

    Sorry it took me so long to get back to this thread. I got side tracked with a different project and only now got back to what I was originally working on.

    Thanks, Murray! I didn't know there was such a function.

  4. #4
    The Barnfather jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead has much to be proud of jmurrayhead's Avatar
    Join Date
    Mar 2008
    Location
    Reston, VA
    Posts
    4,547
    Blog Entries
    9
    Real Name
    Jason
    Rep Power
    22

    Cheers, glad I could help
    jmurrayhead
    If you agree, give me rep.
    If you like it here...throw us a few bones to help support us.


+ Reply to Thread

Similar Threads

  1. line breaks in javascript
    By yangski in forum JavaScript Programming
    Replies: 2
    Last Post: July 26th, 2009, 08:34 PM
  2. need help passing value for update
    By Rebelle in forum ASP Development
    Replies: 10
    Last Post: July 7th, 2009, 05:04 PM
  3. Capturing keystrokes in textbox and passing values to function
    By richyrich in forum JavaScript Programming
    Replies: 1
    Last Post: June 15th, 2009, 10:37 AM
  4. href, passing values
    By Rebelle in forum ASP Development
    Replies: 14
    Last Post: June 10th, 2009, 11:30 PM
  5. Form: Textarea (restrict length)
    By Rebelle in forum JavaScript Programming
    Replies: 2
    Last Post: September 11th, 2008, 11:40 AM

Bookmarks

Posting Permissions

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

SEO by vBSEO