This is kinda relate to my other question...but anyway long story short.

I am looking into a way that I can insert a well structured paragraph into the mysql and then display it on the web later on.

I have the textarea and the text can insert into the mysql but the only format it will keep is the new line (</br> thing)

I did some research on the net but seem to be I am using the wrong keyword...

anyway the format I am talking about is like this

Example:
   This is a sample test/
    1.  Fwefwfew\
    2.  Fghfhfh
    3.  Fgdgdfgdg
        •   Ghfhhffgh
        •   Fghhf

and when displaying this record it should give out exactly the same as above...

Can someone point me a direction please?
thanks

Use a rich text editor. I use TinyMCE and it is one of the best in my opinion. But you have to be aware that there is some learning curve.

here's the easy logic hard to program type of code, create a php code that has an ability to update a certain file. during the process of updating the contents of the file, and that should be called that will display on another page. you do not need database if your php-based created file's location is permanent.

so...the best way to do is store as another doc and then calling it back...?

If you want to have formatted text that user inputs and formats then the best option is to use ready made rich text editor. As I said TinyMCE is just one of them. It will offer your users plenty of possibilities to format the text (font, color, lists, tables etc.) and will generate safe html code for you to store in a database as i.e. text type field. You can retrieve that text later and display it formated or use it in any other way. If you plan to write this functionality yourself it will take a lot of effort.

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.