0
Using html in an input text field
New Here
,
/t5/dreamweaver-discussions/using-html-in-an-input-text-field/td-p/99791
Jun 14, 2006
Jun 14, 2006
Copy link to clipboard
Copied
Hey all,
I need to be able to retain some kind of formatting when placing data in a mysql database.
Currently when the data is pulled back out of the db it is just one loooonnnnnng string. Thats no good. I need at the very least paragraphs formatted.
I am using a standard web form to input text and I am aware that I can use html tags to format text on the way in, however the problem lies with my clients knowing nothing about html, and nor do they want to for that matter.
Is there any way to keep formating when using standard web forms?
Thanks
I need to be able to retain some kind of formatting when placing data in a mysql database.
Currently when the data is pulled back out of the db it is just one loooonnnnnng string. Thats no good. I need at the very least paragraphs formatted.
I am using a standard web form to input text and I am aware that I can use html tags to format text on the way in, however the problem lies with my clients knowing nothing about html, and nor do they want to for that matter.
Is there any way to keep formating when using standard web forms?
Thanks
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/using-html-in-an-input-text-field/m-p/99792#M188438
Jun 14, 2006
Jun 14, 2006
Copy link to clipboard
Copied
I take it your using PHP.
Just the nl2br() command, which converts new line codes to <br> codes, so
that the code is shown as it was entered when shown in a browser.
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
Just the nl2br() command, which converts new line codes to <br> codes, so
that the code is shown as it was entered when shown in a browser.
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
concretegong
AUTHOR
New Here
,
/t5/dreamweaver-discussions/using-html-in-an-input-text-field/m-p/99793#M188439
Jun 14, 2006
Jun 14, 2006
Copy link to clipboard
Copied
Thanks mate,
You are right - I am using php. That will take care of line breaks.
Now.... what about other formatting? Bold text, italics, color?
Am I asking too much?
You are right - I am using php. That will take care of line breaks.
Now.... what about other formatting? Bold text, italics, color?
Am I asking too much?
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/using-html-in-an-input-text-field/m-p/99794#M188440
Jun 14, 2006
Jun 14, 2006
Copy link to clipboard
Copied
Well you can allow people to enter HTML tags themselves, but
make sure you
weed out any <script> tags etc, which allow people to do nasty things, such
as redirect people viewing the page to a different site.
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
weed out any <script> tags etc, which allow people to do nasty things, such
as redirect people viewing the page to a different site.
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
concretegong
AUTHOR
New Here
,
LATEST
/t5/dreamweaver-discussions/using-html-in-an-input-text-field/m-p/99795#M188441
Jun 15, 2006
Jun 15, 2006
Copy link to clipboard
Copied
Ok, but the problem is my clients dont know any html and dont
care to learn it either!
What I'm after is something similar to the form I am using to enter this post.
What I'm after is something similar to the form I am using to enter this post.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

