#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    22
    Rep Power
    0
    Hi, Jumping in the deep end I'm starting PHP by writing
    a virtual postcards system.
    I would like to pass a complete < TEXTAREA > including
    CR/LF without the user needing to add special characters.
    Any suggestions please.
    ------------------
    With my kind regards,
    Peter.
    NOTE: Jords answer below solved the problem -thnak you.
    [This message has been edited by pjlewis (edited June 30, 2000).]Peter

    [This message has been edited by pjlewis (edited June 30, 2000).]
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    4
    Rep Power
    0
    You'll have to convert the newline characters to html breaks(<BR> ) if you want to do this. Use the PHP function nl2br to do this, i.e:

    $textarea_with_brs = nl2br($textarea);
    echo $textarea_with_brs;

    I think this should help you,

    Cheers,

    Jord
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2000
    Posts
    79
    Rep Power
    15
    You also need to...
    str_replace(""",""", $textarea);
    (unless magic quotes is on)
    OR
    use addslashes($textarea);

    Basil


Similar Threads

  1. Replies: 0
    Last Post: January 27th, 2004, 12:42 PM
  2. Passing data to form(s) ???
    By hbcontract in forum PHP Development
    Replies: 1
    Last Post: January 17th, 2004, 05:31 PM
  3. my comp sux lately , need help from pro's
    By Hykinsel007 in forum Windows Help
    Replies: 2
    Last Post: January 5th, 2004, 01:52 PM
  4. Passing data throught 2 php files
    By Manso in forum MySQL Help
    Replies: 1
    Last Post: December 20th, 2003, 07:42 AM
  5. Passing array data
    By pgudge in forum PHP Development
    Replies: 6
    Last Post: December 16th, 2003, 04:52 AM

IMN logo majestic logo threadwatch logo seochat tools logo