Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2006
    Posts
    311
    Thanks
    0
    Thanked 1 Time in 1 Post

    formating question

    I have a form text area that looks like this:

    PHP Code:
    <textarea rows="5" name="check_desc" cols="50"  style="border:1px solid #666666; WIDTH: 100%; padding-left:4; padding-right:4; padding-top:1; padding-bottom:1">
    Name:
    Address:
    City:
    State:
    Zip Code:
    Country:

    </
    textarea
    When I post the data it comes out looking like this:

    PHP Code:
    NameAddressCityStateZip CodeCountry
    How do I format it so that it come out like this:

    Name:
    Address:
    City:
    State:
    Zip Code:
    Country:

  • #2
    Regular Coder
    Join Date
    Mar 2008
    Posts
    118
    Thanks
    3
    Thanked 9 Times in 9 Posts
    PHP Code:
    $check_desc nl2br($_POST["check_desc"]);

    echo 
    $check_desc
    That's assuming that your form method is POST. This should work to hold the line breaks.


  •  

    Posting Permissions

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