[PHP] PRE-formated text into DATABASE

2002-02-22 Thread Dani

Hi there,

I'm tryng to make an online form which update the content of a database.

I have tried it and it works BUT the user has to include all of the HTML
tags otherwise the text which is pulled out (displayed on the webpage)
from the database loose the pre-formated form. All the paragraphs are
gone... and everything is just in one line.

I'm just wondering if there is another way to preserve a pre-formated
text (for example from Ms Word) that the user put into the form and the
insert into the database without including the HTML tags.

thanks.

regards,
Dani


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] PRE-formated text into DATABASE

2002-02-22 Thread Kevin Stone

The function, nl2br() swaps end-line characters for HTML br tags.
This is usually adequate for this situation.  Though the default
end-line character (\n or \r) can differ between operating systems, I
have yet to experience a major problem.  -Kevin

-Original Message-
From: Dani [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 22, 2002 3:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] PRE-formated text into DATABASE
Importance: High

Hi there,

I'm tryng to make an online form which update the content of a database.

I have tried it and it works BUT the user has to include all of the HTML
tags otherwise the text which is pulled out (displayed on the webpage)
from the database loose the pre-formated form. All the paragraphs are
gone... and everything is just in one line.

I'm just wondering if there is another way to preserve a pre-formated
text (for example from Ms Word) that the user put into the form and the
insert into the database without including the HTML tags.

thanks.

regards,
Dani


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php