Problem (formatting form text)

They have: 2 posts

Joined: Sep 2009

Hi I am currently building a site using php and mysql. The problem I have is I have inserted a insert form for members to upload content. It all works fine, however the main content they add shows as 1 big paragraph. Is there a way to make it show in the format they uploaded it

thanks

Mike

He has: 629 posts

Joined: May 2007

I guess you are using plain text and inserting it into a web page "as-is". All "whitespace" (spaces, line-feeds, tabs...) is converted to a single space per the rules for displaying HTML. You need some way of inserting HTML tags in order to format the text.

There are several solutions. One is to allow the use of simplified markup like Markdown or Textile, and use the appropriate (free) software to convert this to HTML. The other suggestion I have is to use JavaScript to create a rich text editor from your textarea.

Other members may be able to offer more solutions...

Cordially, David
--
delete from internet where user_agent="MSIE" and version < 8;

They have: 2 posts

Joined: Sep 2009

Thanks

I need to have it like the first two options as users will be just pasting articles into the webpage

I will give them a try

davecoventry's picture

He has: 112 posts

Joined: Jun 2009

Have a look at YUI, which, I think is a Javascript and CSS implementation which can do what you want it to...

Specifically, look at this page...

They have: 25 posts

Joined: Sep 2009

I second YUI

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.