SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Sep 2000
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have set up a textarea on a form and I am handling all
    input etc with php.
    My problem is that when I process the textarea field then all the embedded spaces that are kept when you type in this textare box are lost and I just get a php string that
    has all the spaces , line breaks etc missing ?

    I am missing the point somewhere. How can I keep all of these attributes in the string ?

  2. #2
    SitePoint Wizard silver trophy Karl's Avatar
    Join Date
    Jul 1999
    Location
    Derbyshire, UK
    Posts
    4,411
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hmmm, the spaces should not be missing (Unless you have consecutive spaces) as for the line breaks you need to run this function on the data before it is output to the browser:
    Code:
      $data = nl2br( $data );
    Karl Austin :: Profile :: KDA Web Services Ltd.
    Business Web Hosting :: Managed Dedicated Hosting
    Call 0800 542 9764 today and ask how we can help your business grow.

  3. #3
    SitePoint Wizard edshuck's Avatar
    Join Date
    Jul 2000
    Posts
    1,200
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hi

    can you post the code for the textarea. the problem sounds familiar and one thing i do is make sure i have ftp'ed my latest changes to the server. (This is a problem for me more often than not when a difficulty arises). then the next item i check is the mysql file to make sure it got there and what condition it is in. if there is a problem here, i check the update commands to upload. i often find some problem with a missing , (but that causes a parse error).

    peace ed

  4. #4
    SitePoint Member
    Join Date
    Sep 2000
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks guys.

    Running the data function sorted things out.


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
  •