Forum Moderators: phranque

Message Too Old, No Replies

HTML User Input

Need to be able to accept input from user and translate to HTML

         

tecdac

1:18 pm on Sep 18, 2002 (gmt 0)



This may seem like a naive question to the more experienced.

My website accepts user input through a form and stores the input in a database (happens to be SQL Server but that shouldn't make a difference).

The input is displayed on a detail page.

The users are hitting the enter button when they want a new paragraph but on the detail page their paragraph break is not happening. I can go into their text and add HTML tags which solves the display problem but this is not a practical solution as the users have the ability to update their content.

It sounds to me like I need some kind of HTML editor functionality built into my input fields.

Am I dreaming or is there something out there like that? The site was built with Dreamweaver UD.

Thanks,

David
<edit - sig url snipped>

[edited by: oilman at 7:59 pm (utc) on Sep. 18, 2002]

ergophobe

9:28 pm on Sep 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month




Am I dreaming or is there something out there like that?

Nope, you're not dreaming. You have parse the input with some scripting language (Perl, PHP, ASP). Anyone competent at any of these languages should be able to do it for you pretty easily.

Tom

Nick_W

9:33 pm on Sep 18, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, with PHP you would use the nl2br() function that would make all new lines into <br /> tags. (as the simplest example)

Nick