insert into mysql keep original format

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vuacorona
Forum Newbie
Posts: 3
Joined: Tue Oct 10, 2006 12:06 pm

insert into mysql keep original format

Post by vuacorona »

Dear all gurus,

I build a table in MySQL, and in the table has a column name artical with text as datatype. I also have a textbox in the html form. When I pasted some texts from word into this textbox and import into database, then I lost all of the indent as well as newline.

I had searched the forum, but I could find any similar result for my question. Your advise is appreciated.

Again thank you very much for sharing your knowledges.


.
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

try

Code: Select all

<html>
	<body>
		<pre>a b  c   d    e
		  xyz</pre>
	</body>
</html>
see http://www.w3.org/TR/html4/struct/text. ... uote]9.3.4 Preformatted text: The PRE element[/quote]
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:3. Do not make multiple, identical posts. This is viewed as spam and will be deleted.
Post Reply