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

    Join Date
    Jul 2000
    Posts
    27
    Rep Power
    0
    I made a php/mysql guestbook, but when i post a message with some blank rules like this:

    hello

    i'm fine

    my guestbook shows the following: hello i'm fine. How can i fix this?
  2. #2
  3. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    use nl2br() function to converting all your newlines to break.

    eg:

    $string ="hello n";
    $string.="i am fine n";

    $string=nl2br($string);

    echo $string;


    ------------------
    SR -
    webshiju.com

    "The fear of the LORD is the beginning of knowledge..."

    [This message has been edited by Shiju Rajan (edited August 01, 2000).]

Similar Threads

  1. simple asp based guestbook
    By fmh002 in forum ASP Programming
    Replies: 1
    Last Post: October 23rd, 2003, 03:39 PM
  2. Embeding my guestbook (php) into html, help.
    By Conambo in forum PHP Development
    Replies: 2
    Last Post: June 28th, 2003, 03:01 PM
  3. Replies: 3
    Last Post: April 25th, 2003, 03:36 AM
  4. Replies: 2
    Last Post: April 23rd, 2003, 05:57 PM
  5. grant others to write in the personal guestbook
    By D-flyer in forum PHP Development
    Replies: 12
    Last Post: November 28th, 2001, 08:56 AM

IMN logo majestic logo threadwatch logo seochat tools logo