Hi friends,

In one of my project I had a text box and I want to store its content to database.

I blocked mysql injection with "mysql_real_escape_string" command.
But I need to add some formating button in that field. ie italics, bold, font size and link field.

From a site I found that they are taking input like this Hi I m wonder how to change this to html filed and save in database or it will changed to html while running it from database ?

Please help me
Thanks in advance
Rajeesh

Hello,
Your “input like this” didn’t added , only “Hi”, . A form field with html in its value is text, so there is no problem saving it to database. All that are shortcuts , if I understood correctly your question what you are talking about is a WYSIWYG like tnyMCE.

Hi check out these:

niceedit,
yui2,
Tinymce,
cuteeditor,

They can all be googled..

They will install into your textarea, with a few simple adjustments and give you a lot more options in your textarea than you described above :-)

Hi friends thanks for the reply and

replace "hi" with this

From a site I found that they are taking input like this

(COLOR="magenta")Name(/COLOR)

* Replace ( and ) with [ and ]

I m wonder how to change this to html filed and save in database or it will changed to html while running it from database ?

Please help me
Thanks in advance
Rajeesh

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.